|
|
|
@ -295,7 +295,23 @@ public class MessagePushRecordServiceImpl extends BaseServiceImpl<MessagePushRec
|
|
|
|
|
QueryWrapper<MessagePushRecordEntity> query = Wrappers.query(); |
|
|
|
|
query.select("business_classify businessClassify,count(0) todoNum"); |
|
|
|
|
query.eq("account", AuthUtil.getUserId()); |
|
|
|
|
query.in("status", Lists.newArrayList(MessageConstants.PUSH_SUCCESS,MessageConstants.CONFIRM)); |
|
|
|
|
query.in("status", Lists.newArrayList(MessageConstants.PUSH_SUCCESS)); |
|
|
|
|
query.groupBy("business_classify"); |
|
|
|
|
List<Map<String, Object>> list = noAurhScopeMapper.selectMaps(query); |
|
|
|
|
return list.stream().map(map -> { |
|
|
|
|
UnreadMessageVO unreadMessageVO = Func.toBean(map, UnreadMessageVO.class); |
|
|
|
|
unreadMessageVO.setBusinessName(DictCache.getValue("businessClassify", unreadMessageVO.getBusinessClassify())); |
|
|
|
|
return unreadMessageVO; |
|
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public List<UnreadMessageVO> getPersonalAppUnreadMessage() { |
|
|
|
|
QueryWrapper<MessagePushRecordEntity> query = Wrappers.query(); |
|
|
|
|
query.select("business_classify businessClassify,count(0) todoNum"); |
|
|
|
|
query.eq("account", AuthUtil.getUserId()); |
|
|
|
|
query.eq("type", MessageConstants.APP_PUSH); |
|
|
|
|
query.in("status", Lists.newArrayList(MessageConstants.PUSH_SUCCESS)); |
|
|
|
|
query.groupBy("business_classify"); |
|
|
|
|
List<Map<String, Object>> list = noAurhScopeMapper.selectMaps(query); |
|
|
|
|
return list.stream().map(map -> { |
|
|
|
|