Commit 678e80bc by Administrator

Merge branch 'feature/get4RayBook' into 'master'

feat: [1003673] 扫码直接跳小程序

See merge request rays/pcloud-book!983
parents b028919b 46166cb6
...@@ -662,6 +662,7 @@ public interface BookBiz { ...@@ -662,6 +662,7 @@ public interface BookBiz {
PageBeanNew<BookDto> getAdviserBooks4Rights(String keyword, Long agentId, Long templetId, Long secondTempletId, String typeCode, Integer currentPage, Integer numPerPage, Integer isIgnore); PageBeanNew<BookDto> getAdviserBooks4Rights(String keyword, Long agentId, Long templetId, Long secondTempletId, String typeCode, Integer currentPage, Integer numPerPage, Integer isIgnore);
void createBookGroupAppletUrl(Long bookId, Long channelId, Long adviserId,List<Long> sceneIds);
/** /**
* 小程序首页书刊搜索 * 小程序首页书刊搜索
* @author:zhuyajie * @author:zhuyajie
......
...@@ -2408,6 +2408,7 @@ public class BookBizImpl implements BookBiz { ...@@ -2408,6 +2408,7 @@ public class BookBizImpl implements BookBiz {
return page; return page;
} }
@Override
public void createBookGroupAppletUrl(Long bookId, Long channelId, Long adviserId,List<Long> sceneIds){ public void createBookGroupAppletUrl(Long bookId, Long channelId, Long adviserId,List<Long> sceneIds){
BookAdviserDto bookAdviserDto = bookAdviserDao.getBase(bookId,channelId,adviserId); BookAdviserDto bookAdviserDto = bookAdviserDao.getBase(bookId,channelId,adviserId);
Long raysClassifyId = bookRaysClassifyDao.getClassifyIdByBookTemplateId(bookAdviserDto.getTempletId()); Long raysClassifyId = bookRaysClassifyDao.getClassifyIdByBookTemplateId(bookAdviserDto.getTempletId());
......
...@@ -960,4 +960,12 @@ public interface BookGroupBiz { ...@@ -960,4 +960,12 @@ public interface BookGroupBiz {
Integer getBookGroupCountByAgent(Integer joinGroupType, Long agentId); Integer getBookGroupCountByAgent(Integer joinGroupType, Long agentId);
List<BookServeDTO> getBookAndBookGroupServeIds4Price(Long adviserId, Long bookId, Long channelId); List<BookServeDTO> getBookAndBookGroupServeIds4Price(Long adviserId, Long bookId, Long channelId);
/**
* 根据bookgroupId查小睿书
* @author:zhuyajie
* @date:2020/9/28 10:51
* * @param null
*/
BookGroupDTO getRayBookByBookGroupId(Long bookGroupId);
} }
...@@ -179,7 +179,6 @@ import com.pcloud.book.record.entity.BookBrowseRecord; ...@@ -179,7 +179,6 @@ import com.pcloud.book.record.entity.BookBrowseRecord;
import com.pcloud.book.rightsSetting.biz.RightsSettingBiz; import com.pcloud.book.rightsSetting.biz.RightsSettingBiz;
import com.pcloud.book.rightsSetting.constants.RightsSettingConstant; import com.pcloud.book.rightsSetting.constants.RightsSettingConstant;
import com.pcloud.book.rightsSetting.dto.RightsSettingDto; import com.pcloud.book.rightsSetting.dto.RightsSettingDto;
import com.pcloud.book.rightsSetting.entity.RightsNowItem;
import com.pcloud.book.skill.biz.PcloudGroupActivityBiz; import com.pcloud.book.skill.biz.PcloudGroupActivityBiz;
import com.pcloud.book.skill.entity.PcloudGroupActivity; import com.pcloud.book.skill.entity.PcloudGroupActivity;
import com.pcloud.book.util.common.ThreadPoolUtils; import com.pcloud.book.util.common.ThreadPoolUtils;
...@@ -5124,7 +5123,21 @@ public class BookGroupBizImpl implements BookGroupBiz { ...@@ -5124,7 +5123,21 @@ public class BookGroupBizImpl implements BookGroupBiz {
public BookAppletSceneDTO getBookAppletBySceneId( Long sceneId ) { public BookAppletSceneDTO getBookAppletBySceneId( Long sceneId ) {
BookAppletScene bySceneId = bookAppletSceneDao.getBySceneId(sceneId); BookAppletScene bySceneId = bookAppletSceneDao.getBySceneId(sceneId);
if (bySceneId == null) { if (bySceneId == null) {
return null; //关联书刊是否开启小睿流程
QrcodeSceneDto qrcodeSceneDto = qrcodeSceneConsr.getById(sceneId);
if (null == qrcodeSceneDto || !qrcodeSceneDto.getQrcodeType().equals("ali")) {
return null;
}
BookAdviserDto bookAdviserDto = bookAdviserDao.getBase(qrcodeSceneDto.getAdviserBookId(), qrcodeSceneDto.getChannelPartyId(), qrcodeSceneDto.getCreatedByUserLogin());
if (null == bookAdviserDto || YesOrNoEnums.NO.getValue().equals(bookAdviserDto.getIsOpenRobotProcess())) {
return null;
}
//给二维码创建小睿码
ThreadPoolUtils.OTHER_THREAD_POOL.execute(() -> {
bookBiz.createBookGroupAppletUrl(qrcodeSceneDto.getAdviserBookId(), qrcodeSceneDto.getChannelPartyId(), qrcodeSceneDto.getCreatedByUserLogin(), Arrays.asList(sceneId));
});
bySceneId = new BookAppletScene();
bySceneId.setSceneId(sceneId);
} }
BookAppletSceneDTO dto = new BookAppletSceneDTO(); BookAppletSceneDTO dto = new BookAppletSceneDTO();
BeanUtils.copyProperties(bySceneId, dto); BeanUtils.copyProperties(bySceneId, dto);
...@@ -5688,6 +5701,22 @@ public class BookGroupBizImpl implements BookGroupBiz { ...@@ -5688,6 +5701,22 @@ public class BookGroupBizImpl implements BookGroupBiz {
return serveDTOList; return serveDTOList;
} }
@Override
public BookGroupDTO getRayBookByBookGroupId(Long bookGroupId) {
BookGroupDTO bookGroupDTO = bookGroupDao.getBookBaseInfoById(bookGroupId);
if (null == bookGroupDTO){
return new BookGroupDTO();
}
bookGroupDTO.setAdviserId(bookGroupDTO.getCreateUser());
BookAdviserDto bookAdviserDto = bookAdviserDao.getBase(bookGroupDTO.getBookId(), bookGroupDTO.getChannelId(), bookGroupDTO.getCreateUser());
if (null != bookAdviserDto && YesOrNoEnums.YES.getValue().equals(bookAdviserDto.getIsOpenRobotProcess())) {
bookGroupDTO.setOpenWeapp(true);
} else {
bookGroupDTO.setOpenWeapp(false);
}
return bookGroupDTO;
}
private void setAppPrice(List<BookServeDTO> serveDTOList) { private void setAppPrice(List<BookServeDTO> serveDTOList) {
if (ListUtils.isEmpty(serveDTOList)) { if (ListUtils.isEmpty(serveDTOList)) {
return; return;
......
...@@ -53,4 +53,9 @@ public class BookAppletSceneDTO extends BaseDto { ...@@ -53,4 +53,9 @@ public class BookAppletSceneDTO extends BaseDto {
* 小程序公众号id * 小程序公众号id
*/ */
private Long accountSettingId; private Long accountSettingId;
/**
* 现代纸书自建码的id
*/
private Long sceneId;
} }
...@@ -786,4 +786,8 @@ public interface BookGroupFacade { ...@@ -786,4 +786,8 @@ public interface BookGroupFacade {
@RequestParam(value = "currentPage", required = false) Integer currentPage, @RequestParam(value = "currentPage", required = false) Integer currentPage,
@RequestParam(value = "numPerPage", required = false) Integer numPerPage) @RequestParam(value = "numPerPage", required = false) Integer numPerPage)
throws BizException, PermissionException; throws BizException, PermissionException;
@ApiOperation("根据bookgroupId查小睿书")
@GetMapping("getRayBookByBookGroupId")
ResponseDto<?> getRayBookByBookGroupId(@RequestParam("bookGroupId") Long bookGroupId);
} }
...@@ -1291,4 +1291,9 @@ public class BookGroupFacadeImpl implements BookGroupFacade { ...@@ -1291,4 +1291,9 @@ public class BookGroupFacadeImpl implements BookGroupFacade {
return new ResponseDto<>(pageBean); return new ResponseDto<>(pageBean);
} }
@Override
@GetMapping("getRayBookByBookGroupId")
public ResponseDto<?> getRayBookByBookGroupId(@RequestParam("bookGroupId") Long bookGroupId){
return new ResponseDto<>(bookGroupBiz.getRayBookByBookGroupId(bookGroupId));
}
} }
...@@ -91,6 +91,7 @@ ...@@ -91,6 +91,7 @@
FROM book_applet_scene FROM book_applet_scene
WHERE scene_id=#{sceneId} WHERE scene_id=#{sceneId}
AND is_delete = 0 AND is_delete = 0
limit 1
</select> </select>
<select id="updateRaysClassifyIdByBookGroupId" parameterType="map"> <select id="updateRaysClassifyIdByBookGroupId" parameterType="map">
......
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