|
|
@@ -3,6 +3,7 @@ package com.goafanti.message.service.impl;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.Date;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.UUID;
|
|
|
@@ -20,6 +21,8 @@ import com.goafanti.common.model.MessageConsumer;
|
|
|
import com.goafanti.common.model.MessageFromSystem;
|
|
|
import com.goafanti.common.model.MessageProducer;
|
|
|
import com.goafanti.common.model.User;
|
|
|
+import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
+import com.goafanti.core.mybatis.page.Pagination;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import com.goafanti.message.bo.MessageBo;
|
|
|
import com.goafanti.message.enums.ConsumerType;
|
|
|
@@ -28,7 +31,7 @@ import com.goafanti.message.enums.SubjectType;
|
|
|
import com.goafanti.message.service.MessageService;
|
|
|
|
|
|
@Service
|
|
|
-public class MessageServiceImpl implements MessageService{
|
|
|
+public class MessageServiceImpl extends BaseMybatisDao<MessageFromSystemMapper> implements MessageService{
|
|
|
@Autowired
|
|
|
private MessageFromSystemMapper messageFromSystemMapper;
|
|
|
@Autowired
|
|
|
@@ -282,10 +285,15 @@ public class MessageServiceImpl implements MessageService{
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
@Override
|
|
|
- public List<MessageFromSystem> listPersonalMessage(Integer subject, Integer sourceType) {
|
|
|
+ public Pagination<MessageFromSystem> listPersonalMessage(Integer subject, Integer sourceType,Integer pageNo,Integer pageSize) {
|
|
|
if(subject == SubjectType.KE_HU.getTypeCode() || subject == SubjectType.TUI_JIAN.getTypeCode()){
|
|
|
- return messageFromSystemMapper.listPersonalMessage(subject, sourceType,TokenManager.getUserId());
|
|
|
+ Map<String,Object> params = new HashMap<String, Object>();
|
|
|
+ if(null != subject) params.put("subject", subject);
|
|
|
+ if(null != sourceType) params.put("sourceType", sourceType);
|
|
|
+ params.put("uid", TokenManager.getUserId());
|
|
|
+ return (Pagination<MessageFromSystem>)findPage("listPersonalMessageByPage", "listPersonalMessageCount", params, pageNo, pageSize);
|
|
|
}
|
|
|
return null;
|
|
|
}
|