Commit 081a6a6a by 阮思源

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

parent 66e2b718
......@@ -166,4 +166,8 @@ public interface BookGroupService {
@ApiOperation("补充社群书旧的作品应用到新的表")
@GetMapping("addOldBookGroupAppToNew")
void addOldBookGroupAppToNew();
@ApiOperation("根据类型获取社群书id集合")
@GetMapping("getBookGroupIdsByJoinGroupType")
ResponseEntity<ResponseDto<List<Long>>> getBookGroupIdsByJoinGroupType(@RequestParam("joinGroupType") Integer joinGroupType);
}
......@@ -485,11 +485,13 @@ public class WechatGroupConsr {
@ParamLog("批量获取小号名称信息")
public Map<String, RobotBaseInfoDTO> mapRobotInfo(List<String> altIds) {
Map<String, RobotBaseInfoDTO> map = new HashMap<>();
if (ListUtils.isEmpty(altIds)){
return map;
}
try {
map = ResponseHandleUtil.parseMapResponse(selfRobotService.mapRobotInfo(altIds), String.class, RobotBaseInfoDTO.class);
} catch (Exception e) {
log.error("查询链接发送次数.[getLinkSendCount]:" + e.getMessage(), e);
log.error("批量获取小号名称信息.[mapRobotInfo]:" + e.getMessage(), e);
}
return map;
}
......
......@@ -625,4 +625,9 @@ public interface BookGroupBiz {
* @return
*/
PageBeanNew<UserBookInfoVO> listUser4SelfPush(UserSelectParamDTO userSelectParamDTO);
/**
* 根据类型获取社群书id集合
*/
List<Long> getBookGroupIdsByJoinGroupType(Integer joinGroupType);
}
......@@ -3605,4 +3605,11 @@ public class BookGroupBizImpl implements BookGroupBiz {
groupSet.setUserBookInfo4SelfPush(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> {
* 个人号统计数量
*/
Integer countSelfBookGroupStatistics(Map<String,Object> map);
/**
* 根据类型获取社群书id集合
*/
List<Long> getIdsByJoinGroupType(Integer joinGroupType);
}
......@@ -288,4 +288,11 @@ public class BookGroupDaoImpl extends BaseDaoImpl<BookGroup> implements BookGrou
public Integer countSelfBookGroupStatistics(Map<String, Object> 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 {
public void 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 @@
ORDER BY
t.create_time DESC
</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>
\ 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