From 4a2deb11b819dd78a8c75e244ef67ec2e48cf5f5 Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期一, 14 四月 2025 21:03:28 +0800 Subject: [PATCH] 重构轮灌组修改接口 --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaDistrictMapper.xml | 28 ++++++++++++++++++++++------ 1 files changed, 22 insertions(+), 6 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 23dd4ce..abf4bc4 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaDistrictMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaDistrictMapper.xml @@ -7,7 +7,7 @@ <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 column="num" jdbcType="VARCHAR" 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> @@ -47,7 +47,7 @@ values (#{id,jdbcType=BIGINT}, #{supperId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, - #{num,jdbcType=TINYINT}, + #{num,jdbcType=VARCHAR}, #{level,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT}, #{deleted,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT} ) @@ -87,7 +87,7 @@ #{name,jdbcType=VARCHAR}, </if> <if test="num != null"> - #{num,jdbcType=TINYINT}, + #{num,jdbcType=VARCHAR}, </if> <if test="level != null"> #{level,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT}, @@ -105,7 +105,7 @@ `name` = #{name,jdbcType=VARCHAR}, </if> <if test="num != null"> - num = #{num,jdbcType=TINYINT}, + num = #{num,jdbcType=VARCHAR}, </if> <if test="supperId != null"> supperId = #{supperId,jdbcType=BIGINT}, @@ -124,7 +124,7 @@ update ba_district set supperId = #{supperId,jdbcType=BIGINT}, `name` = #{name,jdbcType=VARCHAR}, - num = #{num,jdbcType=TINYINT}, + num = #{num,jdbcType=VARCHAR}, `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} @@ -163,6 +163,22 @@ INNER JOIN ba_district con ON tow.supperId = con.id INNER JOIN ba_district cit ON con.supperId = cit.id INNER JOIN ba_district pro ON cit.supperId = pro.id - WHERE vil.id = ${villageId} + WHERE vil.id = #{villageId} </select> + + <!--鏍规嵁绾у埆鑾峰彇琛屾斂鍖哄垝鍒楄〃--> + <select id="getDistrictgsByLevel" resultType="java.util.Map"> + SELECT + CAST(id AS char) AS id, + name + FROM ba_district WHERE `level` = #{level} + </select> + + <!--鏍规嵁鐖禝D鑾峰彇琛屾斂鍖哄垝鍒楄〃--> + <select id="getDistrictsBySupperId" resultType="java.util.Map"> + SELECT + CAST(id AS char) AS id, + name + FROM ba_district WHERE supperId = #{supperId} + </select> </mapper> \ No newline at end of file -- Gitblit v1.8.0