From 69700f493598b849f104d55d9b464c4b93e3ee09 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期四, 01 八月 2024 16:47:38 +0800
Subject: [PATCH] 远程测控接口解决bug
---
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/FeedbackCtrl.java | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/FeedbackCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/FeedbackCtrl.java
index dcc040c..9dd9134 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/FeedbackCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/FeedbackCtrl.java
@@ -5,6 +5,7 @@
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.pojoOp.OpeFeedback;
+import com.dy.pipIrrGlobal.pojoOp.OpeFeedbackReply;
import com.dy.pipIrrGlobal.voOp.Vofeedback;
import io.swagger.v3.oas.annotations.Parameter;
import jakarta.validation.Valid;
@@ -132,4 +133,28 @@
return BaseResponseUtils.buildException(e.getMessage());
}
}
+
+
+ /**
+ * 娣诲姞闂鍙嶉鍥炲
+ * @param reply
+ * @param bindingResult
+ * @return
+ */
+ @PostMapping(path = "addReply", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @Transactional(rollbackFor = Exception.class)
+ @SsoAop
+ public BaseResponse<Boolean> addReply(@RequestBody @Valid OpeFeedbackReply reply, @Parameter(hidden = true) BindingResult bindingResult){
+ if (bindingResult != null && bindingResult.hasErrors()) {
+ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+ if (reply.getFeedbackId() == null){
+ return BaseResponseUtils.buildFail("璇蜂紶鍏ュ弽棣堢紪鍙穒d");
+ }
+ Integer rec = Optional.ofNullable(feedbackSv.addReply(reply)).orElse(0);
+ if (rec == 0) {
+ return BaseResponseUtils.buildFail("娣诲姞鍥炲澶辫触");
+ }
+ return BaseResponseUtils.buildSuccess(true);
+ }
}
--
Gitblit v1.8.0