Compare commits

...

2 Commits

Author SHA1 Message Date
wangliwen aaeda5f9bd ... 2022-06-22 10:45:42 +08:00
wangliwen 40817f2ddf 站内信通知区分来源 2022-06-22 10:22:48 +08:00
3 changed files with 8 additions and 3 deletions

View File

@ -20,6 +20,7 @@ import io.swagger.annotations.ApiOperation;
import okhttp3.OkHttpClient; import okhttp3.OkHttpClient;
import okhttp3.Request; import okhttp3.Request;
import okhttp3.Response; import okhttp3.Response;
import org.apache.commons.lang3.ObjectUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -197,7 +198,7 @@ public class CensusControllerV2 {
re.put("deptName", sysDeptService.get(Long.valueOf(index)).getName()); re.put("deptName", sysDeptService.get(Long.valueOf(index)).getName());
re.put("count", i.get(index).stream().mapToLong(index_ -> index_.values().stream().mapToLong(count_ -> count_).sum()).sum()); re.put("count", i.get(index).stream().mapToLong(index_ -> index_.values().stream().mapToLong(count_ -> count_).sum()).sum());
return re; return re;
}).collect(Collectors.toList()); }).filter(index -> ObjectUtils.allNotNull(index)).collect(Collectors.toList());
result.sort(Comparator.comparing(x -> { result.sort(Comparator.comparing(x -> {
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
try { try {

View File

@ -73,7 +73,10 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
@Override @Override
public PageData<SysNoticeDTO> getMyNoticePage(Map<String, Object> params) { public PageData<SysNoticeDTO> getMyNoticePage(Map<String, Object> params) {
//分页 //分页
IPage<SysNoticeEntity> page = getPage(params, null, false); IPage<SysNoticeEntity> page = baseDao.selectPage(
getPage(params, null, false),
getWrapper(params)
);
//查询 //查询
params.put("receiverId", SecurityUser.getUserId()); params.put("receiverId", SecurityUser.getUserId());

View File

@ -11,7 +11,8 @@
<!-- 获取我的通知列表 --> <!-- 获取我的通知列表 -->
<select id="getMyNoticeList" resultType="io.renren.modules.notice.entity.SysNoticeEntity"> <select id="getMyNoticeList" resultType="io.renren.modules.notice.entity.SysNoticeEntity">
select t2.id, t2.title, t2.type, t2.sender_name, t2.sender_date, t1.read_status, t2.content from sys_notice_user t1, sys_notice t2 select t2.id, t2.title, t2.type, t2.sender_name, t2.sender_date, t1.read_status, t2.content ,t2.`from` from
sys_notice_user t1, sys_notice t2
where t1.notice_id = t2.id and t1.receiver_id = #{receiverId} where t1.notice_id = t2.id and t1.receiver_id = #{receiverId}
<if test="readStatus != null"> <if test="readStatus != null">
AND read_status = #{readStatus} AND read_status = #{readStatus}