Commit f6c47323 by 阮思源

Merge branch 'feat-1001923' into 'master'

修改社群书统计没有数据bug,加内部接口

See merge request rays/pcloud-book!257
parents 66e2b718 081a6a6a
...@@ -166,4 +166,8 @@ public interface BookGroupService { ...@@ -166,4 +166,8 @@ public interface BookGroupService {
@ApiOperation("补充社群书旧的作品应用到新的表") @ApiOperation("补充社群书旧的作品应用到新的表")
@GetMapping("addOldBookGroupAppToNew") @GetMapping("addOldBookGroupAppToNew")
void addOldBookGroupAppToNew(); void addOldBookGroupAppToNew();
@ApiOperation("根据类型获取社群书id集合")
@GetMapping("getBookGroupIdsByJoinGroupType")
ResponseEntity<ResponseDto<List<Long>>> getBookGroupIdsByJoinGroupType(@RequestParam("joinGroupType") Integer joinGroupType);
} }
...@@ -485,11 +485,13 @@ public class WechatGroupConsr { ...@@ -485,11 +485,13 @@ public class WechatGroupConsr {
@ParamLog("批量获取小号名称信息") @ParamLog("批量获取小号名称信息")
public Map<String, RobotBaseInfoDTO> mapRobotInfo(List<String> altIds) { public Map<String, RobotBaseInfoDTO> mapRobotInfo(List<String> altIds) {
Map<String, RobotBaseInfoDTO> map = new HashMap<>(); Map<String, RobotBaseInfoDTO> map = new HashMap<>();
if (ListUtils.isEmpty(altIds)){
return map;
}
try { try {
map = ResponseHandleUtil.parseMapResponse(selfRobotService.mapRobotInfo(altIds), String.class, RobotBaseInfoDTO.class); map = ResponseHandleUtil.parseMapResponse(selfRobotService.mapRobotInfo(altIds), String.class, RobotBaseInfoDTO.class);
} catch (Exception e) { } catch (Exception e) {
log.error("查询链接发送次数.[getLinkSendCount]:" + e.getMessage(), e); log.error("批量获取小号名称信息.[mapRobotInfo]:" + e.getMessage(), e);
} }
return map; return map;
} }
......
...@@ -625,4 +625,9 @@ public interface BookGroupBiz { ...@@ -625,4 +625,9 @@ public interface BookGroupBiz {
* @return * @return
*/ */
PageBeanNew<UserBookInfoVO> listUser4SelfPush(UserSelectParamDTO userSelectParamDTO); PageBeanNew<UserBookInfoVO> listUser4SelfPush(UserSelectParamDTO userSelectParamDTO);
/**
* 根据类型获取社群书id集合
*/
List<Long> getBookGroupIdsByJoinGroupType(Integer joinGroupType);
} }
...@@ -3605,4 +3605,11 @@ public class BookGroupBizImpl implements BookGroupBiz { ...@@ -3605,4 +3605,11 @@ public class BookGroupBizImpl implements BookGroupBiz {
groupSet.setUserBookInfo4SelfPush(list); groupSet.setUserBookInfo4SelfPush(list);
return new PageBeanNew<>(currentPage, numPerPage, countlist.size(), list); return new PageBeanNew<>(currentPage, numPerPage, countlist.size(), list);
} }
@ParamLog("根据类型获取社群书id集合")
@Override
public List<Long> getBookGroupIdsByJoinGroupType(Integer joinGroupType) {
List<Long> bookGroupIds = bookGroupDao.getIdsByJoinGroupType(joinGroupType);
return bookGroupIds;
}
} }
...@@ -262,4 +262,9 @@ public interface BookGroupDao extends BaseDao<BookGroup> { ...@@ -262,4 +262,9 @@ public interface BookGroupDao extends BaseDao<BookGroup> {
* 个人号统计数量 * 个人号统计数量
*/ */
Integer countSelfBookGroupStatistics(Map<String,Object> map); Integer countSelfBookGroupStatistics(Map<String,Object> map);
/**
* 根据类型获取社群书id集合
*/
List<Long> getIdsByJoinGroupType(Integer joinGroupType);
} }
...@@ -288,4 +288,11 @@ public class BookGroupDaoImpl extends BaseDaoImpl<BookGroup> implements BookGrou ...@@ -288,4 +288,11 @@ public class BookGroupDaoImpl extends BaseDaoImpl<BookGroup> implements BookGrou
public Integer countSelfBookGroupStatistics(Map<String, Object> map) { public Integer countSelfBookGroupStatistics(Map<String, Object> map) {
return super.getSqlSession().selectOne(getStatement("countSelfBookGroupStatistics"),map); return super.getSqlSession().selectOne(getStatement("countSelfBookGroupStatistics"),map);
} }
@Override
public List<Long> getIdsByJoinGroupType(Integer joinGroupType) {
Map<String, Object> map = new HashMap<>();
map.put("joinGroupType", joinGroupType);
return super.getSqlSession().selectList(getStatement("getIdsByJoinGroupType"),map);
}
} }
...@@ -288,4 +288,12 @@ public class BookGroupServiceImpl implements BookGroupService { ...@@ -288,4 +288,12 @@ public class BookGroupServiceImpl implements BookGroupService {
public void addOldBookGroupAppToNew() { public void addOldBookGroupAppToNew() {
bookGroupAppBiz.addOldBookGroupAppToNew(); bookGroupAppBiz.addOldBookGroupAppToNew();
} }
@ApiOperation("根据类型获取社群书id集合")
@GetMapping("getBookGroupIdsByJoinGroupType")
@Override
public ResponseEntity<ResponseDto<List<Long>>> getBookGroupIdsByJoinGroupType(@RequestParam("joinGroupType") Integer joinGroupType) {
List<Long> bookGroupIds = bookGroupBiz.getBookGroupIdsByJoinGroupType(joinGroupType);
return ResponseHandleUtil.toResponse(bookGroupIds);
}
} }
...@@ -780,4 +780,13 @@ ...@@ -780,4 +780,13 @@
ORDER BY ORDER BY
t.create_time DESC t.create_time DESC
</select> </select>
<!--根据类型获取社群书id集合-->
<select id="getIdsByJoinGroupType" parameterType="map" resultType="long">
select id from book_group
where is_delete=0
<if test="joinGroupType!=null">
and join_group_type=#{joinGroupType}
</if>
</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