|
@@ -4,12 +4,12 @@ import com.aizuda.boot.modules.common.MessageEvent;
|
|
|
import com.aizuda.boot.modules.system.entity.SysMessage;
|
|
|
import com.aizuda.boot.modules.system.entity.SysMessageReceiver;
|
|
|
import com.aizuda.boot.modules.system.entity.vo.InformMessageVO;
|
|
|
+import com.aizuda.boot.modules.system.entity.vo.MyMessageVO;
|
|
|
import com.aizuda.boot.modules.system.entity.vo.SysMessageVO;
|
|
|
import com.aizuda.boot.modules.system.mapper.SysMessageMapper;
|
|
|
import com.aizuda.boot.modules.system.service.ISysMessageReceiverService;
|
|
|
import com.aizuda.boot.modules.system.service.ISysMessageService;
|
|
|
import com.aizuda.boot.modules.system.service.ISysSSEService;
|
|
|
-import com.aizuda.boot.modules.system.service.ISysUserRoleService;
|
|
|
import com.aizuda.core.api.ApiAssert;
|
|
|
import com.aizuda.service.service.BaseServiceImpl;
|
|
|
import com.aizuda.service.web.UserSession;
|
|
@@ -57,15 +57,15 @@ public class SysMessageServiceImpl extends BaseServiceImpl<SysMessageMapper, Sys
|
|
|
UserSession userSession = UserSession.getLoginInfo();
|
|
|
InformMessageVO vo = new InformMessageVO();
|
|
|
// 通知
|
|
|
- Page<SysMessage> noticePage = this.pageCategoryByUser(userSession.getId(), 0);
|
|
|
+ Page<MyMessageVO> noticePage = this.pageCategoryByUser(userSession.getId(), 0);
|
|
|
vo.setNoticeNum(noticePage.getTotal());
|
|
|
vo.setNoticeList(noticePage.getRecords());
|
|
|
// 消息
|
|
|
- Page<SysMessage> messagePage = this.pageCategoryByUser(userSession.getId(), 1);
|
|
|
+ Page<MyMessageVO> messagePage = this.pageCategoryByUser(userSession.getId(), 1);
|
|
|
vo.setMessageNum(messagePage.getTotal());
|
|
|
vo.setMessageList(messagePage.getRecords());
|
|
|
// 待办
|
|
|
- Page<SysMessage> todoPage = this.pageCategoryByUser(userSession.getId(), 2);
|
|
|
+ Page<MyMessageVO> todoPage = this.pageCategoryByUser(userSession.getId(), 2);
|
|
|
vo.setTodoNum(todoPage.getTotal());
|
|
|
vo.setTodoList(todoPage.getRecords());
|
|
|
// 总数量
|
|
@@ -73,8 +73,8 @@ public class SysMessageServiceImpl extends BaseServiceImpl<SysMessageMapper, Sys
|
|
|
return vo;
|
|
|
}
|
|
|
|
|
|
- public Page<SysMessage> pageCategoryByUser(Long userId, Integer category) {
|
|
|
- return super.page(Page.of(1, 5));
|
|
|
+ public Page<MyMessageVO> pageCategoryByUser(Long userId, Integer category) {
|
|
|
+ return baseMapper.selectPageMyNotViewed(Page.of(1, 5), userId, category);
|
|
|
}
|
|
|
|
|
|
@Override
|