Commit 0ab97961 by 朱亚洁

bug:[none]生成公众号二维码失败

parent e1df2bc9
......@@ -29,7 +29,6 @@ import com.pcloud.book.group.dao.ResourcePageItemDao;
import com.pcloud.book.group.dto.BookGroupDTO;
import com.pcloud.book.group.dto.BookGroupServeDTO;
import com.pcloud.book.group.entity.BookAppletScene;
import com.pcloud.book.group.entity.BookGroup;
import com.pcloud.book.group.entity.BookGroupServe;
import com.pcloud.book.group.entity.ResourcePage;
import com.pcloud.book.group.entity.ResourcePageColumn;
......@@ -365,13 +364,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
}
Long officialSceneId = resourcePage.getOfficialSceneId();
if (null == officialSceneId) {
CompletableFuture<Long> sceneIdFuture = CompletableFuture.supplyAsync(() ->
this.createOfficialScene(resourcePage.getBookGroupId(), resourcePage.getSceneId()));
try {
officialSceneId = sceneIdFuture.get();
} catch (InterruptedException |ExecutionException e) {
throw new BookBizException(BookBizException.ERROR, "二维码生成失败!");
}
officialSceneId = this.createOfficialScene(resourcePage.getBookGroupId(), resourcePage.getSceneId());
if (null == officialSceneId) {
throw new BookBizException(BookBizException.ERROR, "二维码生成失败!");
}
......@@ -419,9 +412,8 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
Long bookId = null;
Long channelId = null;
Long adviserId = null;
BookGroupDTO bookGroupDTO = new BookGroupDTO();
if (null != bookGroupId) {
bookGroupDTO = bookGroupDao.getDTOById(bookGroupId);
BookGroupDTO bookGroupDTO = bookGroupDao.getDTOById(bookGroupId);
if (null == bookGroupDTO) {
throw new BookBizException(BookBizException.ERROR,"RAYS码不存在");
}
......@@ -446,12 +438,6 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
if (groupQrcodeVO == null) {
throw new BookBizException(BookBizException.ERROR, "二维码生成失败!");
}
if (null != bookGroupId) {
BookGroup group = new BookGroup();
group.setId(bookGroupId);
group.setSceneId(groupQrcodeVO.getSceneId());
bookGroupDao.update(group);
}
return groupQrcodeVO.getSceneId();
}
return null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment