From f2be4ed3f71f85f15f2c6bb6ab1d0263c1bd5f3a Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期六, 11 十一月 2023 22:13:47 +0800
Subject: [PATCH] 1、完善一些代码 2、实现了片区管理 3、增加了apache的BeanUtils实现对象转Map

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaDistrictMapper.xml |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaDistrictMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaDistrictMapper.xml
index 0732885..f8679a0 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaDistrictMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaDistrictMapper.xml
@@ -8,10 +8,11 @@
     <id column="supperId" jdbcType="BIGINT" property="supperId" />
     <result column="name" jdbcType="VARCHAR" property="name" />
     <result property="level" column="level" typeHandler="com.dy.common.mybatis.envm.EnumCodeTypeHandler" javaType="com.dy.pipIrrGlobal.util.DistrictLevel"/>
+    <result property="deleted" column="deleted" typeHandler="com.dy.common.mybatis.envm.EnumCodeTypeHandler" javaType="com.dy.common.mybatis.envm.Deleted"/>
   </resultMap>
   <sql id="Base_Column_List">
     <!--@mbg.generated-->
-    id, supperId, `name`, `level`
+    id, supperId, `name`, `level`, deleted
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     <!--@mbg.generated-->
@@ -39,10 +40,20 @@
     delete from ba_district
     where id = #{id,jdbcType=BIGINT}
   </delete>
+  <delete id="deleteLogicById" parameterType="java.lang.Long">
+    <!--@mbg.generated-->
+    update ba_district set deleted = 1
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
   <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoBa.BaDistrict">
     <!--@mbg.generated-->
-    insert into ba_district (id, supperId, `name`, `level`)
-    values (#{id,jdbcType=BIGINT}, #{supperId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{level,jdbcType=TINYINT})
+    insert into ba_district (id, supperId, `name`, `level`, deleted)
+    values (#{id,jdbcType=BIGINT},
+            #{supperId,jdbcType=BIGINT},
+            #{name,jdbcType=VARCHAR},
+            #{level,jdbcType=TINYINT},
+            #{deleted,jdbcType=TINYINT}
+    )
   </insert>
   <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoBa.BaDistrict">
     <!--@mbg.generated-->
@@ -60,6 +71,9 @@
       <if test="level != null">
         `level`,
       </if>
+      <if test="deleted != null">
+        deleted,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -73,6 +87,9 @@
       </if>
       <if test="level != null">
         #{level,jdbcType=TINYINT},
+      </if>
+      <if test="deleted != null">
+        #{deleted,jdbcType=TINYINT},
       </if>
     </trim>
   </insert>
@@ -89,6 +106,9 @@
       <if test="level != null">
         `level` = #{level,jdbcType=TINYINT},
       </if>
+      <if test="deleted != null">
+        deleted = #{deleted,jdbcType=TINYINT},
+      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -97,7 +117,8 @@
     update ba_district
     set supperId = #{supperId,jdbcType=BIGINT},
         `name` = #{name,jdbcType=VARCHAR},
-        `level` = #{level,jdbcType=TINYINT}
+        `level` = #{level,jdbcType=TINYINT},
+        deleted = #{deleted,jdbcType=TINYINT}
     where id = #{id,jdbcType=BIGINT}
   </update>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0