|
|
@@ -1,19 +1,19 @@
|
|
|
package com.uas.ps.message.api;
|
|
|
|
|
|
-import com.uas.ps.core.page.PageInfo;
|
|
|
import com.uas.ps.core.page.PageParams;
|
|
|
+import com.uas.ps.httplog.annotation.HttpLog;
|
|
|
import com.uas.ps.message.domain.Message;
|
|
|
import com.uas.ps.message.service.MessageService;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
/**
|
|
|
* Created by wangyc on 2018/1/13.
|
|
|
*
|
|
|
@@ -38,6 +38,7 @@ public class MessageController {
|
|
|
* @param pageParams 分页参数
|
|
|
* @return
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(method = RequestMethod.GET, produces = "application/json")
|
|
|
public Page<Message> getMessages(String receiverUu, String receiverEnuu, String consumerApp, PageParams pageParams) {
|
|
|
return messageService.getMessages(receiverUu, receiverEnuu, consumerApp, pageParams);
|
|
|
@@ -48,6 +49,7 @@ public class MessageController {
|
|
|
* @param messages 消息
|
|
|
* @return
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(method = RequestMethod.POST, produces = "application/json")
|
|
|
public List<Message> saveMessages(@RequestBody String messages) {
|
|
|
// TODO 日志
|
|
|
@@ -59,6 +61,7 @@ public class MessageController {
|
|
|
* @param consumerApp 接收消息app
|
|
|
* @return
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(value = "/send", method = RequestMethod.POST, produces = "application/json")
|
|
|
public Map<String, Object> sendMessage(@RequestBody String consumerApp) {
|
|
|
return messageService.sendMessage(consumerApp);
|
|
|
@@ -69,6 +72,7 @@ public class MessageController {
|
|
|
* @param cousumer 消息接收者信息
|
|
|
* @return
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(value = "/read", method = RequestMethod.POST, produces = "application/json")
|
|
|
public Message read(@RequestBody String cousumer) {
|
|
|
return messageService.readMessage(cousumer);
|