From 90e87eec386968943e5697a4378a31d08f50edf4 Mon Sep 17 00:00:00 2001
From: Fancy <Fancy.fx@outlook.com>
Date: 星期四, 27 六月 2024 11:26:19 +0800
Subject: [PATCH] some NotNull error
---
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java
index 353bbd1..754eaac 100644
--- a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java
+++ b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java
@@ -1,6 +1,12 @@
package com.dy.pmsStation.assemblyStep;
+import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
+import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -11,4 +17,31 @@
@RestController
@RequestMapping(path = "assemblyStep")
public class AssemblyStepCtrl {
+ private AssemblyStepSv sv;
+ @Autowired
+ public void setSv(AssemblyStepSv sv) {
+ this.sv = sv;
+ }
+
+ @PostMapping(path = "save")
+ public BaseResponse save(@RequestBody @Valid QueryVo vo) {
+ log.info("AssemblyStepCtrl.save()");
+ int count = sv.save(vo);
+ if (count <= 0) {
+ return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�");
+ } else {
+ return BaseResponseUtils.buildSuccess(true);
+ }
+ }
+
+ @PostMapping(path = "repair")
+ public BaseResponse repair(@RequestBody @Valid QueryVo vo) {
+ log.info("AssemblyStepCtrl.repair()");
+ int count = sv.repair(vo);
+ if (count <= 0) {
+ return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�");
+ } else {
+ return BaseResponseUtils.buildSuccess(true);
+ }
+ }
}
--
Gitblit v1.8.0