|  |  | 
 |  |  |     <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  | 
 |  |  | 
 |  |  |     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> | 
 |  |  |   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> | 
 |  |  |  | 
 |  |  |   <insert id="putin" parameterType="com.dy.pipIrrGlobal.pojoBa.BaDistrict"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     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`, deleted) | 
 |  |  |     insert into ba_district (id, supperId, `name`, num, `level`, deleted) | 
 |  |  |     values (#{id,jdbcType=BIGINT}, | 
 |  |  |             #{supperId,jdbcType=BIGINT}, | 
 |  |  |             #{name,jdbcType=VARCHAR}, | 
 |  |  |             #{level,jdbcType=TINYINT}, | 
 |  |  |             #{deleted,jdbcType=TINYINT} | 
 |  |  |             #{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 | 
 |  |  | 
 |  |  |       </if> | 
 |  |  |       <if test="name != null"> | 
 |  |  |         `name`, | 
 |  |  |       </if> | 
 |  |  |       <if test="num != null"> | 
 |  |  |         num, | 
 |  |  |       </if> | 
 |  |  |       <if test="level != null"> | 
 |  |  |         `level`, | 
 |  |  | 
 |  |  |       <if test="name != null"> | 
 |  |  |         #{name,jdbcType=VARCHAR}, | 
 |  |  |       </if> | 
 |  |  |       <if test="num != null"> | 
 |  |  |         #{num,jdbcType=TINYINT}, | 
 |  |  |       </if> | 
 |  |  |       <if test="level != null"> | 
 |  |  |         #{level,jdbcType=TINYINT}, | 
 |  |  |         #{level,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT}, | 
 |  |  |       </if> | 
 |  |  |       <if test="deleted != null"> | 
 |  |  |         #{deleted,jdbcType=TINYINT}, | 
 |  |  |         #{deleted,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT}, | 
 |  |  |       </if> | 
 |  |  |     </trim> | 
 |  |  |   </insert> | 
 |  |  | 
 |  |  |       <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}, | 
 |  |  |       </if> | 
 |  |  |       <if test="level != null"> | 
 |  |  |         `level` = #{level,jdbcType=TINYINT}, | 
 |  |  |         `level` = #{level,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT}, | 
 |  |  |       </if> | 
 |  |  |       <if test="deleted != null"> | 
 |  |  |         deleted = #{deleted,jdbcType=TINYINT}, | 
 |  |  |         deleted = #{deleted,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT}, | 
 |  |  |       </if> | 
 |  |  |     </set> | 
 |  |  |     where id = #{id,jdbcType=BIGINT} | 
 |  |  | 
 |  |  |     update ba_district | 
 |  |  |     set supperId = #{supperId,jdbcType=BIGINT}, | 
 |  |  |         `name` = #{name,jdbcType=VARCHAR}, | 
 |  |  |         `level` = #{level,jdbcType=TINYINT}, | 
 |  |  |         deleted = #{deleted,jdbcType=TINYINT} | 
 |  |  |         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} | 
 |  |  |   </update> | 
 |  |  |   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     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> | 
 |  |  | </mapper> |