From a42c2d24721a08b0066089ebcdf49c569676735d Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期日, 12 十一月 2023 17:29:10 +0800
Subject: [PATCH] 1、添加权限验证注解、事务注解 2、用户管理中增加功能:保存、修改、删除

---
 pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictSv.java |   58 +++++++++++++++++++++++++++++++---------------------------
 1 files changed, 31 insertions(+), 27 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictSv.java
index a8f4ae3..ff2cfeb 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictSv.java
@@ -5,6 +5,7 @@
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
 
@@ -17,33 +18,6 @@
     @Autowired
     private void setDao(BaDistrictMapper dao){
         this.dao = dao;
-    }
-
-    /**
-     * 淇濆瓨瀹炰綋
-     * @param po 瀹炰綋
-     * @return 鏁伴噺
-     */
-    public int save(BaDistrict po){
-        return this.dao.insert(po) ;
-    }
-
-    /**
-     * 淇濆瓨淇敼瀹炰綋
-     * @param po 瀹炰綋
-     * @return 鏁伴噺
-     */
-    public int update(BaDistrict po){
-        return this.dao.updateByPrimaryKeySelective(po) ;
-    }
-
-    /**
-     * 淇濆瓨淇敼瀹炰綋
-     * @param id 瀹炰綋ID
-     * @return 鏁伴噺
-     */
-    public int delete(Long id){
-        return this.dao.deleteLogicById(id) ;
     }
 
     /**
@@ -71,6 +45,36 @@
     }
 
     /**
+     * 淇濆瓨瀹炰綋
+     * @param po 瀹炰綋
+     * @return 鏁伴噺
+     */
+    @Transactional
+    public int save(BaDistrict po){
+        return this.dao.insert(po) ;
+    }
+
+    /**
+     * 淇濆瓨淇敼瀹炰綋
+     * @param po 瀹炰綋
+     * @return 鏁伴噺
+     */
+    @Transactional
+    public int update(BaDistrict po){
+        return this.dao.updateByPrimaryKeySelective(po) ;
+    }
+
+    /**
+     * 淇濆瓨淇敼瀹炰綋
+     * @param id 瀹炰綋ID
+     * @return 鏁伴噺
+     */
+    @Transactional
+    public int delete(Long id){
+        return this.dao.deleteLogicById(id) ;
+    }
+
+    /**
      * 寰楀埌涓嬬骇琛屾斂鍖哄垝
      * @param po 涓婄骇琛屾斂鍖哄垝
      */

--
Gitblit v1.8.0