From 530385f0901cb838540bc3f83d573686eb3a3bb4 Mon Sep 17 00:00:00 2001
From: liuxm <liuxm@fescotech.com>
Date: 星期四, 16 五月 2024 17:48:47 +0800
Subject: [PATCH] 按功能点添加权限;工站添加生产线关联

---
 pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductCtrl.java |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 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 f2e651e..a3d01fc 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
@@ -100,12 +100,18 @@
     @GetMapping(path="delete")
     @SsoPowerAop(power = "10300001")
     @Log("鍒犻櫎浜у搧淇℃伅")
-    public BaseResponse<PltProduct> delete(String id){
+    public BaseResponse<Boolean> delete(String id){
+        int count;
         try {
-            return BaseResponseUtils.buildSuccess(proSv.delete(Long.parseLong(id)));
+            count = proSv.delete(Long.parseLong(id));
         }catch (Exception e){
             log.error("鍒犻櫎浜у搧寮傚父", e);
             return BaseResponseUtils.buildException(e.getMessage());
+        }
+        if (count <= 0) {
+            return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�");
+        } else {
+            return BaseResponseUtils.buildSuccess(true);
         }
     }
 
@@ -145,4 +151,21 @@
             return BaseResponseUtils.buildException(e.getMessage());
         }
     }
+
+    /**
+     * 鏌ヨ鎵�鏈変骇鍝�
+     * @return
+     */
+    @GetMapping(path="all")
+    @SsoPowerAop(power = "10300000")
+    @Log("鏌ヨ鎵�鏈変骇鍝�")
+    public BaseResponse<List<PltProduct>> all(){
+        try {
+            List<PltProduct> list = proSv.selectAll() ;
+            return BaseResponseUtils.buildSuccess(list);
+        }catch (Exception e){
+            log.error("鏌ヨ鎵�鏈変骇鍝佸紓甯�", e);
+            return BaseResponseUtils.buildException(e.getMessage());
+        }
+    }
 }

--
Gitblit v1.8.0