From 5d1bcde6e4d00620fcc7e7c7a89bda7d5ea5b84c Mon Sep 17 00:00:00 2001
From: liuxm <liuxm_a@163.com>
Date: 星期三, 12 六月 2024 10:08:39 +0800
Subject: [PATCH] 添加验证和异常处理

---
 pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsSv.java |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsSv.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsSv.java
index 58edb31..d6a56cd 100644
--- a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsSv.java
+++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsSv.java
@@ -22,7 +22,7 @@
 
     @Transactional
     public int save(PltProductQualityInspectionItems item) {
-        int count = dao.insert(item);
+        int count = dao.insertSelective(item);
         return count;
     }
 
@@ -66,4 +66,12 @@
         rsVo.obj = this.dao.selectSome(params) ;
         return rsVo ;
     }
+
+    @Transactional
+    public int disabled(Long id, Boolean disabled) {
+        PltProductQualityInspectionItems item = new PltProductQualityInspectionItems();
+        item.setId(id);
+        item.setDisabled(disabled);
+        return dao.updateByPrimaryKeySelective(item);
+    }
 }

--
Gitblit v1.8.0