|
@@ -4,6 +4,7 @@ import com.uas.ps.core.page.PageParams;
|
|
|
import com.uas.ps.httplog.annotation.HttpLog;
|
|
import com.uas.ps.httplog.annotation.HttpLog;
|
|
|
import com.uas.ps.message.domain.Message;
|
|
import com.uas.ps.message.domain.Message;
|
|
|
import com.uas.ps.message.service.MessageService;
|
|
import com.uas.ps.message.service.MessageService;
|
|
|
|
|
+import com.uas.ps.message.util.Constant;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.Page;
|
|
import org.springframework.data.domain.Page;
|
|
|
import org.springframework.ui.ModelMap;
|
|
import org.springframework.ui.ModelMap;
|
|
@@ -54,12 +55,13 @@ public class MessageController {
|
|
|
* 获取未读消息数量
|
|
* 获取未读消息数量
|
|
|
* @param receiverUu 收信人uu
|
|
* @param receiverUu 收信人uu
|
|
|
* @param receiverEnuu 收信人企业uu
|
|
* @param receiverEnuu 收信人企业uu
|
|
|
|
|
+ * @param type 消息类型
|
|
|
* @param consumerApp 接收app
|
|
* @param consumerApp 接收app
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/count/unread", method = RequestMethod.GET, produces = "application/json")
|
|
@RequestMapping(value = "/count/unread", method = RequestMethod.GET, produces = "application/json")
|
|
|
- public Map<String, Object> getUnReadMessageCount(String receiverUu, String receiverEnuu, String consumerApp) {
|
|
|
|
|
- return messageService.getUnReadMessageCount(receiverUu, receiverEnuu, consumerApp);
|
|
|
|
|
|
|
+ public Map<String, Object> getUnReadMessageCount(String receiverUu, String receiverEnuu, @RequestParam(required = false) String type, String consumerApp) {
|
|
|
|
|
+ return messageService.getMessageCount(receiverUu, receiverEnuu, consumerApp, type, Constant.NO.toString());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -67,12 +69,13 @@ public class MessageController {
|
|
|
* @param receiverUu 收信人uu
|
|
* @param receiverUu 收信人uu
|
|
|
* @param receiverEnuu 收信人企业uu
|
|
* @param receiverEnuu 收信人企业uu
|
|
|
* @param consumerApp 接收app
|
|
* @param consumerApp 接收app
|
|
|
|
|
+ * @param type 消息类型
|
|
|
* @param isRead 阅读状态
|
|
* @param isRead 阅读状态
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/count", method = RequestMethod.GET, produces = "application/json")
|
|
@RequestMapping(value = "/count", method = RequestMethod.GET, produces = "application/json")
|
|
|
- public Map<String, Object> getMessageCount(String receiverUu, String receiverEnuu, String consumerApp, @RequestParam(required = false) String isRead) {
|
|
|
|
|
- return messageService.getMessageCount(receiverUu, receiverEnuu, consumerApp, isRead);
|
|
|
|
|
|
|
+ public Map<String, Object> getMessageCount(String receiverUu, String receiverEnuu, String consumerApp, @RequestParam(required = false) String type, @RequestParam(required = false) String isRead) {
|
|
|
|
|
+ return messageService.getMessageCount(receiverUu, receiverEnuu, consumerApp, type, isRead);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|