Commit 86bf2eba by 朱亚洁

feat:[1004458]H5资源落地页

parent 26b29549
...@@ -73,6 +73,7 @@ import com.pcloud.book.group.biz.BookGroupBiz; ...@@ -73,6 +73,7 @@ import com.pcloud.book.group.biz.BookGroupBiz;
import com.pcloud.book.group.dao.BookAppletSceneDao; import com.pcloud.book.group.dao.BookAppletSceneDao;
import com.pcloud.book.group.dao.BookGroupDao; import com.pcloud.book.group.dao.BookGroupDao;
import com.pcloud.book.group.dao.BookGroupServeDao; import com.pcloud.book.group.dao.BookGroupServeDao;
import com.pcloud.book.group.dao.ResourcePageItemDao;
import com.pcloud.book.group.dto.BookAppletSceneDTO; import com.pcloud.book.group.dto.BookAppletSceneDTO;
import com.pcloud.book.group.dto.BookGroupDTO; import com.pcloud.book.group.dto.BookGroupDTO;
import com.pcloud.book.group.dto.BookGroupServeCountDTO; import com.pcloud.book.group.dto.BookGroupServeCountDTO;
...@@ -248,6 +249,8 @@ public class BookAdviserBizImpl implements BookAdviserBiz { ...@@ -248,6 +249,8 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
private BookLabelBiz bookLabelBiz; private BookLabelBiz bookLabelBiz;
@Autowired @Autowired
private BookGroupServeDao bookGroupServeDao; private BookGroupServeDao bookGroupServeDao;
@Autowired
private ResourcePageItemDao resourcePageItemDao;
@Override @Override
public List<BookDto> listByAdviserId(Long adviserId) { public List<BookDto> listByAdviserId(Long adviserId) {
...@@ -2916,7 +2919,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz { ...@@ -2916,7 +2919,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
// 填充配置的服务信息 // 填充配置的服务信息
// 查询 book_group_serve // 查询 book_group_serve
CompletableFuture<List<BookGroupServe>> bookGroupServeFuture = CompletableFuture.completedFuture( CompletableFuture<List<BookGroupServe>> bookGroupServeFuture = CompletableFuture.completedFuture(
Optional.ofNullable(bookGroupServeDao.getListByBookGroupIds(bookGroupIds)).orElse(new ArrayList<>())); Optional.ofNullable(resourcePageItemDao.getServeListByBookGroupIds(bookGroupIds)).orElse(new ArrayList<>()));
// 查询 book_group_serve 作品信息 // 查询 book_group_serve 作品信息
// 查询作品ID // 查询作品ID
......
...@@ -539,4 +539,14 @@ public class QrcodeSceneConsr { ...@@ -539,4 +539,14 @@ public class QrcodeSceneConsr {
} }
return map; return map;
} }
@ParamLog("二维码信息(含资源配置)")
public QrcodeSceneDto getDetail(Long sceneId) {
try {
return ResponseHandleUtil.parseResponse(qrcodeSceneService.getDetail(sceneId),QrcodeSceneDto.class);
} catch (Exception e) {
LOGGER.error("调用qrcodeSceneService.getDetail失败"+e.getMessage(),e);
}
return null;
}
} }
...@@ -137,12 +137,13 @@ public interface ResourcePageBiz { ...@@ -137,12 +137,13 @@ public interface ResourcePageBiz {
*/ */
List<BookGroupServe> getServeListByBookGroupId(Long bookGroupId); List<BookGroupServe> getServeListByBookGroupId(Long bookGroupId);
/** /**
* 批量更新预览二维码 * 批量更新资源聚合页二维码
* @author:zhuyajie * @author:zhuyajie
* @date:2021/4/20 1:14 * @date:2021/4/20 1:14
* * @param null * * @param null
*/ */
void batchUpdateQrcode(List<Long> bookGroupIds); void batchUpdateResourceQrcode(List<Long> qrcodeIdList, String qrcodeType);
/** /**
* 根据书籍id和channel获取资源配置页 * 根据书籍id和channel获取资源配置页
...@@ -151,4 +152,4 @@ public interface ResourcePageBiz { ...@@ -151,4 +152,4 @@ public interface ResourcePageBiz {
* @return * @return
*/ */
ResourcePageVO getResourcePageByBookIdAndChannelId(Long adviserBookId, Long channelId); ResourcePageVO getResourcePageByBookIdAndChannelId(Long adviserBookId, Long channelId);
} }
\ No newline at end of file
...@@ -61,4 +61,6 @@ public interface ResourcePageColumnDao extends BaseDao<ResourcePageColumn> { ...@@ -61,4 +61,6 @@ public interface ResourcePageColumnDao extends BaseDao<ResourcePageColumn> {
* * @param null * * @param null
*/ */
void updateSeq4Batch(List<ResourceColumnAndServeVO> list); void updateSeq4Batch(List<ResourceColumnAndServeVO> list);
void deleteByPageId(Long resourcePageId);
} }
\ No newline at end of file
...@@ -53,4 +53,8 @@ public interface ResourcePageItemDao extends BaseDao<ResourcePageItem>{ ...@@ -53,4 +53,8 @@ public interface ResourcePageItemDao extends BaseDao<ResourcePageItem>{
* * @param null * * @param null
*/ */
List<BookGroupServe> getServeListByBookGroupId(Long bookGroupId); List<BookGroupServe> getServeListByBookGroupId(Long bookGroupId);
void deleteByPageId(Long resourcePageId);
List<BookGroupServe> getServeListByBookGroupIds(List<Long> bookGroupIds);
} }
\ No newline at end of file
...@@ -59,4 +59,9 @@ public class ResourcePageColumnDaoImpl extends BaseDaoImpl<ResourcePageColumn> i ...@@ -59,4 +59,9 @@ public class ResourcePageColumnDaoImpl extends BaseDaoImpl<ResourcePageColumn> i
public void updateSeq4Batch(List<ResourceColumnAndServeVO> list) { public void updateSeq4Batch(List<ResourceColumnAndServeVO> list) {
getSessionTemplate().update(getStatement("updateSeq4Batch"), list); getSessionTemplate().update(getStatement("updateSeq4Batch"), list);
} }
@Override
public void deleteByPageId(Long resourcePageId) {
getSessionTemplate().delete(getStatement("deleteByPageId"), resourcePageId);
}
} }
...@@ -51,4 +51,14 @@ public class ResourcePageItemDaoImpl extends BaseDaoImpl<ResourcePageItem> imple ...@@ -51,4 +51,14 @@ public class ResourcePageItemDaoImpl extends BaseDaoImpl<ResourcePageItem> imple
public List<BookGroupServe> getServeListByBookGroupId(Long bookGroupId) { public List<BookGroupServe> getServeListByBookGroupId(Long bookGroupId) {
return getSessionTemplate().selectList(getStatement("getServeListByBookGroupId"), bookGroupId); return getSessionTemplate().selectList(getStatement("getServeListByBookGroupId"), bookGroupId);
} }
@Override
public void deleteByPageId(Long resourcePageId) {
getSessionTemplate().delete(getStatement("deleteByPageId"), resourcePageId);
}
@Override
public List<BookGroupServe> getServeListByBookGroupIds(List<Long> bookGroupIds) {
return getSessionTemplate().selectList(getStatement("getServeListByBookGroupIds"), bookGroupIds);
}
} }
...@@ -153,10 +153,10 @@ public class ResourcePageFacade { ...@@ -153,10 +153,10 @@ public class ResourcePageFacade {
return new ResponseDto<>(resourcePageBiz.getResourcePageByBookGroupIdOrSceneId4Wechat(bookGroupId, wechatUserId, sceneId)); return new ResponseDto<>(resourcePageBiz.getResourcePageByBookGroupIdOrSceneId4Wechat(bookGroupId, wechatUserId, sceneId));
} }
@ApiOperation("批量更新预览二维码") @ApiOperation("批量更新资源页二维码")
@PostMapping("batchUpdateQrcode") @PostMapping("batchUpdateResourceQrcode")
public ResponseDto<?> batchUpdateQrcode(@RequestBody List<Long> bookGroupIds) { public ResponseDto<?> batchUpdateResourceQrcode(@RequestBody List<Long> qrcodeIdList, @RequestParam("qrcodeType") String qrcodeType) {
resourcePageBiz.batchUpdateQrcode(bookGroupIds); resourcePageBiz.batchUpdateResourceQrcode(qrcodeIdList, qrcodeType);
return new ResponseDto<>(); return new ResponseDto<>();
} }
} }
...@@ -687,9 +687,9 @@ ...@@ -687,9 +687,9 @@
G.group_qrcode_name groupQrcodeName, G.dep_label_id bookGroupDepLabelId, G.join_group_type, G.book_group_cipher, G.short_book_name G.group_qrcode_name groupQrcodeName, G.dep_label_id bookGroupDepLabelId, G.join_group_type, G.book_group_cipher, G.short_book_name
, if(IFNULL(case G.join_group_type , if(IFNULL(case G.join_group_type
WHEN 1 then bk.id WHEN 1 then bk.id
WHEN 2 THEN bgs.id WHEN 2 THEN i.id
WHEN 3 THEN srk.id WHEN 3 THEN srk.id
WHEN 4 THEN bgs.id WHEN 4 THEN i.id
else null END,0)=0,0,1)as has_serve, A.IS_PRINT isPrint, G.open_weapp openWeapp, else null END,0)=0,0,1)as has_serve, A.IS_PRINT isPrint, G.open_weapp openWeapp,
G.single_group singleGroup, G.related_book_group_id relatedBookGroupId, G.group_qrcode_link groupQrcodeLink, G.single_group singleGroup, G.related_book_group_id relatedBookGroupId, G.group_qrcode_link groupQrcodeLink,
G.jump_type jumpType, G.jump_url jumpUrl, G.seq G.jump_type jumpType, G.jump_url jumpUrl, G.seq
...@@ -699,9 +699,10 @@ ...@@ -699,9 +699,10 @@
LEFT JOIN BOOK B ON A.BOOK_ID = B.BOOK_ID LEFT JOIN BOOK B ON A.BOOK_ID = B.BOOK_ID
LEFT JOIN BOOK_TYPE T ON B.TYPE_CODE = T.TYPE_CODE LEFT JOIN BOOK_TYPE T ON B.TYPE_CODE = T.TYPE_CODE
LEFT JOIN BOOK_FUND BF ON BF.BOOK_ID = A.BOOK_ID AND BF.END_TIME <![CDATA[ > ]]> NOW() AND BF.START_TIME <![CDATA[ < ]]> NOW() LEFT JOIN BOOK_FUND BF ON BF.BOOK_ID = A.BOOK_ID AND BF.END_TIME <![CDATA[ > ]]> NOW() AND BF.START_TIME <![CDATA[ < ]]> NOW()
LEFT JOIN BOOK_GROUP_SERVE bgs on G.id=bgs.book_group_id
LEFT JOIN BOOK_KEYWORD bk on G.id=bk.book_group_id and bk.is_delete=0 LEFT JOIN BOOK_KEYWORD bk on G.id=bk.book_group_id and bk.is_delete=0
LEFT JOIN self_robot_keyword srk ON G.id = srk.book_group_id LEFT JOIN self_robot_keyword srk ON G.id = srk.book_group_id
LEFT JOIN resource_page p ON g.id = p.book_group_id
LEFT JOIN resource_page_item i ON p.id = i.resource_page_id
WHERE WHERE
G.create_user = #{adviserId} AND G.is_delete = 0 G.create_user = #{adviserId} AND G.is_delete = 0
AND ( AND (
......
...@@ -150,4 +150,7 @@ ...@@ -150,4 +150,7 @@
</foreach> </foreach>
</update> </update>
<delete id="deleteByPageId" parameterType="long">
delete from book.resource_page_column where resource_page_id = #{resourcePageId}
</delete>
</mapper> </mapper>
\ No newline at end of file
...@@ -145,4 +145,29 @@ ...@@ -145,4 +145,29 @@
c.column_seq ASC c.column_seq ASC
</select> </select>
<delete id="deleteByPageId" parameterType="long">
delete from book.resource_page_item where resource_page_id = #{resourcePageId}
</delete>
<select id="getServeListByBookGroupIds" parameterType="list" resultType="com.pcloud.book.group.entity.BookGroupServe">
SELECT
i.serve_id serveId,
i.serve_type serveType,
i.link_url serveUrl,
p.book_group_id bookGroupId,
p.create_user createUser,
i.type_code typeCode
FROM
resource_page_item i
LEFT JOIN resource_page p ON i.resource_page_id = p.id
LEFT JOIN resource_page_column c ON i.resource_page_column_id = c.id
WHERE
p.book_group_id IN
<foreach collection="list" index="index" separator="," open="(" close=")" item="item">
#{item}
</foreach>
AND i.serve_type IN ('APP', 'PRODUCT')
ORDER BY
c.column_seq ASC
</select>
</mapper> </mapper>
\ No newline at end of file
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