From a9cae92c63e3cc52889a08cdb3961f43f5a987ca Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 16 十一月 2023 16:43:29 +0800
Subject: [PATCH] 值转时,id设成supperId了

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaDistrictMapper.xml |   26 ++++++++++++++++++++++----
 1 files changed, 22 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 2455532..52cab3f 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaDistrictMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaDistrictMapper.xml
@@ -7,13 +7,16 @@
     <id column="id" jdbcType="BIGINT" property="id" />
     <id column="supperId" jdbcType="BIGINT" property="supperId" />
     <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="num" jdbcType="TINYINT" property="num" />
     <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`, deleted
+    id, supperId, `name`, num, `level`, deleted
   </sql>
+
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     <!--@mbg.generated-->
     select 
@@ -21,30 +24,35 @@
     from ba_district
     where id = #{id,jdbcType=BIGINT}
   </select>
+
   <select id="selectByLevel" parameterType="java.lang.Byte" resultMap="BaseResultMap">
     <!--@mbg.generated-->
     select
     <include refid="Base_Column_List" />
     from ba_district
-    where level = #{level,jdbcType=TINYINT}
+    where deleted != 1 and level = #{level,jdbcType=TINYINT}
   </select>
+
   <select id="selectBySupperId" parameterType="java.lang.Long" resultMap="BaseResultMap">
     <!--@mbg.generated-->
     select
     <include refid="Base_Column_List" />
     from ba_district
-    where supperId = #{supperId,jdbcType=BIGINT}
+    where deleted != 1 and supperId = #{supperId,jdbcType=BIGINT}
   </select>
+
   <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoBa.BaDistrict">
     <!--@mbg.generated-->
-    insert into ba_district (id, supperId, `name`, `level`, deleted)
+    insert into ba_district (id, supperId, `name`, num, `level`, deleted)
     values (#{id,jdbcType=BIGINT},
             #{supperId,jdbcType=BIGINT},
             #{name,jdbcType=VARCHAR},
+            #{num,jdbcType=TINYINT},
             #{level,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT},
             #{deleted,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT}
     )
   </insert>
+
   <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoBa.BaDistrict">
     <!--@mbg.generated-->
     insert into ba_district
@@ -57,6 +65,9 @@
       </if>
       <if test="name != null">
         `name`,
+      </if>
+      <if test="num != null">
+        num,
       </if>
       <if test="level != null">
         `level`,
@@ -75,6 +86,9 @@
       <if test="name != null">
         #{name,jdbcType=VARCHAR},
       </if>
+      <if test="num != null">
+        #{num,jdbcType=TINYINT},
+      </if>
       <if test="level != null">
         #{level,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT},
       </if>
@@ -89,6 +103,9 @@
     <set>
       <if test="name != null">
         `name` = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="num != null">
+        num = #{num,jdbcType=TINYINT},
       </if>
       <if test="supperId != null">
         supperId = #{supperId,jdbcType=BIGINT},
@@ -107,6 +124,7 @@
     update ba_district
     set supperId = #{supperId,jdbcType=BIGINT},
         `name` = #{name,jdbcType=VARCHAR},
+        num = #{num,jdbcType=TINYINT},
         `level` = #{level,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT},
         deleted = #{deleted,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT}
     where id = #{id,jdbcType=BIGINT}

--
Gitblit v1.8.0