Commit d4cd50d4 by 阮思源

修改群发记录bug

parent f725f7e2
......@@ -103,7 +103,7 @@ public interface PushBiz {
* @param numPerPage
* @return
*/
PageBeanNew<PushGroupDTO> getPushGroupList(Long pushId, Integer currentPage, Integer numPerPage);
PageBeanNew<PushGroupDTO> getPushGroupList(Long pushId, Boolean isRecord, Integer currentPage, Integer numPerPage);
/**
* 获取群发记录集合
......
......@@ -616,10 +616,11 @@ public class PushBizImpl implements PushBiz {
@ParamLog("获取群发关联集合")
@Override
public PageBeanNew<PushGroupDTO> getPushGroupList(Long pushId, Integer currentPage, Integer numPerPage) {
public PageBeanNew<PushGroupDTO> getPushGroupList(Long pushId, Boolean isRecord, Integer currentPage, Integer numPerPage) {
PageParam pageParam = new PageParam(currentPage, numPerPage);
Map<String, Object> map = new HashMap<>();
map.put("pushId",pushId);
map.put("isRecord",isRecord);
PageBeanNew<PushGroupDTO> pageBeanNew = pushGroupDao.listPageNew(pageParam, map, "getPushGroupList");
return pageBeanNew;
}
......@@ -1245,7 +1246,7 @@ public class PushBizImpl implements PushBiz {
return;
}
List<Long> pushIds = pushRecordDTOS.stream().map(PushRecordDTO::getPushId).distinct().collect(Collectors.toList());
List<PushItem> pushItems = pushItemDao.getListByPushIds(pushIds);
List<PushItem> pushItems = pushItemDao.getAllListByPushIds(pushIds);
Map<Long, List<PushItem>> pushItemMap = new HashMap<>();
List<Long> appIds = new ArrayList<>();
List<Long> productIds = new ArrayList<>();
......
......@@ -64,4 +64,11 @@ public interface PushItemDao extends BaseDao<PushItem> {
* @return
*/
List<PushItem> getListByPushId(Long pushId);
/**
* 根据群发id集合查询所有(包括删除了的)
* @param pushIds
* @return
*/
List<PushItem> getAllListByPushIds(List<Long> pushIds);
}
......@@ -66,4 +66,11 @@ public class PushItemDaoImpl extends BaseDaoImpl<PushItem> implements PushItemDa
public List<PushItem> getListByPushId(Long pushId) {
return super.getSqlSession().selectList(getStatement("getListByPushId"), pushId);
}
@Override
public List<PushItem> getAllListByPushIds(List<Long> pushIds) {
Map<String, Object> map = new HashMap<>();
map.put("pushIds",pushIds);
return super.getSqlSession().selectList(getStatement("getAllListByPushIds"), map);
}
}
......@@ -105,6 +105,7 @@ public interface PushFacade {
ResponseDto<?> getPushGroupList(
@RequestHeader("token") @ApiParam("token信息") String token,
@RequestParam("pushId") @ApiParam("群发id") Long pushId,
@RequestParam(value = "isRecord", required = false) @ApiParam("是否记录") Boolean isRecord,
@RequestParam("currentPage") @ApiParam("当前页") Integer currentPage,
@RequestParam("numPerPage") @ApiParam("每页条数") Integer numPerPage
) throws BizException, PermissionException;
......
......@@ -191,6 +191,7 @@ public class PushFacadeImpl implements PushFacade {
public ResponseDto<?> getPushGroupList(
@RequestHeader("token") @ApiParam("token信息") String token,
@RequestParam("pushId") @ApiParam("群发id") Long pushId,
@RequestParam(value = "isRecord", required = false) @ApiParam("是否记录") Boolean isRecord,
@RequestParam("currentPage") @ApiParam("当前页") Integer currentPage,
@RequestParam("numPerPage") @ApiParam("每页条数") Integer numPerPage
) throws BizException, PermissionException {
......@@ -204,7 +205,7 @@ public class PushFacadeImpl implements PushFacade {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "群发id不能为空!");
}
SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
return new ResponseDto<>(pushBiz.getPushGroupList(pushId, currentPage, numPerPage));
return new ResponseDto<>(pushBiz.getPushGroupList(pushId, isRecord, currentPage, numPerPage));
}
@ApiOperation("获取群发记录列表")
......
......@@ -186,8 +186,10 @@
push_group t1
LEFT JOIN book t2 ON t1.book_id = t2.BOOK_ID
LEFT JOIN book_group_qrcode t3 ON t1.book_group_qrcode_id = t3.id
WHERE
t1.is_delete = 0
WHERE 1=1
<if test="isRecord==null or isRecord==false">
AND t1.is_delete = 0
</if>
AND t1.push_id = #{pushId}
</select>
......
......@@ -248,4 +248,15 @@
where is_delete=0
and push_id =#{pushId}
</select>
<!--根据群发id集合查询所有(包括删除了的)-->
<select id="getAllListByPushIds" parameterType="map" resultMap="BaseResultMap">
select <include refid="Base_Column_List"/> from push_item
where
push_id in
<foreach collection="pushIds" item="pushId" open="(" separator="," close=")">
#{pushId}
</foreach>
order by push_id asc, seq_num asc
</select>
</mapper>
\ No newline at end of file
......@@ -119,7 +119,6 @@
LEFT JOIN push_group t1 ON t.push_id = t1.push_id
WHERE
t.is_delete = 0
AND t1.is_delete = 0
AND t.create_user = #{partyId}
GROUP BY
t.id
......
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