From 5a88c6ba9108aef9bf7fdfbea34d5b86bbeffba1 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 09 十一月 2023 15:06:33 +0800
Subject: [PATCH] 完善行政区划代码
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaDistrictMapper.xml | 38 ++++++++++++++++++++++++++++++--------
1 files changed, 30 insertions(+), 8 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 e434616..0732885 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaDistrictMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaDistrictMapper.xml
@@ -5,13 +5,13 @@
<!--@mbg.generated-->
<!--@Table ba_district-->
<id column="id" jdbcType="BIGINT" property="id" />
+ <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"/>
-
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
- id, `name`, `level`
+ id, supperId, `name`, `level`
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
@@ -20,6 +20,20 @@
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}
+ </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}
+ </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--@mbg.generated-->
delete from ba_district
@@ -27,10 +41,8 @@
</delete>
<insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoBa.BaDistrict">
<!--@mbg.generated-->
- insert into ba_district (id, `name`, `level`
- )
- values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{level,jdbcType=TINYINT}
- )
+ insert into ba_district (id, supperId, `name`, `level`)
+ values (#{id,jdbcType=BIGINT}, #{supperId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{level,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoBa.BaDistrict">
<!--@mbg.generated-->
@@ -38,6 +50,9 @@
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
+ </if>
+ <if test="supperId != null">
+ supperId,
</if>
<if test="name != null">
`name`,
@@ -49,6 +64,9 @@
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
+ </if>
+ <if test="supperId != null">
+ #{supperId,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
@@ -65,6 +83,9 @@
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
+ <if test="supperId != null">
+ supperId = #{supperId,jdbcType=BIGINT},
+ </if>
<if test="level != null">
`level` = #{level,jdbcType=TINYINT},
</if>
@@ -74,8 +95,9 @@
<update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoBa.BaDistrict">
<!--@mbg.generated-->
update ba_district
- set `name` = #{name,jdbcType=VARCHAR},
- `level` = #{level,jdbcType=TINYINT}
+ set supperId = #{supperId,jdbcType=BIGINT},
+ `name` = #{name,jdbcType=VARCHAR},
+ `level` = #{level,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0