From abc305426c16e7ea9d21c12c41356c18ddb1adef Mon Sep 17 00:00:00 2001
From: liuxm <liuxm@fescotech.com>
Date: 星期二, 14 五月 2024 16:29:58 +0800
Subject: [PATCH] 产品管理功能,组合了工艺文件,用户手册,物料清单,技术参数

---
 pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductCtrl.java |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductCtrl.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductCtrl.java
index 66ceacc..f2e651e 100644
--- a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductCtrl.java
+++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductCtrl.java
@@ -6,15 +6,10 @@
 import com.dy.common.webUtil.BaseResponseUtils;
 import com.dy.common.webUtil.QueryResultVo;
 import com.dy.pmsGlobal.aop.Log;
-import com.dy.pmsGlobal.daoOth.OthFileMapper;
-import com.dy.pmsGlobal.dyFile.FileOperate;
-import com.dy.pmsGlobal.dyFile.FileRestVo;
-import com.dy.pmsGlobal.pojoOth.OthFile;
 import com.dy.pmsGlobal.pojoPlt.PltProduct;
 import jakarta.validation.Valid;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.*;
 
@@ -48,20 +43,21 @@
     @PostMapping(path="save")
     @SsoPowerAop(power = "10300001")
     @Log("淇濆瓨浜у搧淇℃伅")
-    public BaseResponse<PltProduct> save(@RequestBody @Valid PltProduct pro, BindingResult bindingResult){
+    public BaseResponse<PltProduct> save(@RequestBody @Valid PltProduct pro,
+                                         BindingResult bindingResult){
         pro.id = null;
-        Long id;
+        int count;
         try {
             if (bindingResult != null && bindingResult.hasErrors()) {
                 return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
             }
             pro.setDeleted(false);
-            id = proSv.save(pro);
+            count = proSv.save(pro);
         }catch (Exception e){
             log.error("淇濆瓨浜у搧寮傚父", e);
             return BaseResponseUtils.buildException(e.getMessage());
         }
-        if (id <= 0) {
+        if (count <= 0) {
             return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�");
         } else {
             return BaseResponseUtils.buildSuccess(true);

--
Gitblit v1.8.0