|
|
@@ -3,6 +3,7 @@ package com.zhongshu.iot.server.core.controller.devices;
|
|
|
import com.github.microservice.auth.security.annotations.ResourceAuth;
|
|
|
import com.github.microservice.auth.security.type.AuthType;
|
|
|
import com.github.microservice.net.ResultContent;
|
|
|
+import com.zhongshu.card.client.model.base.IDParam;
|
|
|
import com.zhongshu.iot.client.model.artemis.OperationMessageModel;
|
|
|
import com.zhongshu.iot.client.model.artemis.OperationMessageResultModel;
|
|
|
import com.zhongshu.iot.client.model.artemis.OperationMessageResultSearch;
|
|
|
@@ -17,9 +18,9 @@ import org.springframework.data.domain.Page;
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
import org.springframework.data.web.PageableDefault;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
+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;
|
|
|
|
|
|
/**
|
|
|
@@ -68,11 +69,16 @@ public class OperationMessageController {
|
|
|
|
|
|
@ResourceAuth(value = "user", type = AuthType.User)
|
|
|
@Operation(summary = "得到消息详情")
|
|
|
- @RequestMapping(value = "getMessageById", method = {RequestMethod.GET})
|
|
|
- public ResultContent<OperationMessageResultModel> getMessageById(
|
|
|
- @Parameter(name = "id", description = "数据ID", example = "")
|
|
|
- @RequestParam("id") String id) {
|
|
|
- return operationMessageService.getMessageById(id);
|
|
|
+ @RequestMapping(value = "getMessageById", method = {RequestMethod.POST})
|
|
|
+ public ResultContent<OperationMessageResultModel> getMessageById(@RequestBody IDParam param) {
|
|
|
+ return operationMessageService.getMessageById(param.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
+ @Operation(summary = "删除消息信息")
|
|
|
+ @RequestMapping(value = "deleteMessage", method = {RequestMethod.POST})
|
|
|
+ public ResultContent<OperationMessageResultModel> deleteMessage(@RequestBody IDParam param) {
|
|
|
+ return operationMessageService.deleteResultMessage(param.getId());
|
|
|
}
|
|
|
|
|
|
|