|  |  |  | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | order by id DESC | 
|---|
|  |  |  | <trim prefix="limit " > | 
|---|
|  |  |  | <if test="queryStart != null and queryCount != null"> | 
|---|
|  |  |  | #{queryStart}, #{queryCount} | 
|---|
|  |  |  | <if test="start != null and count != null"> | 
|---|
|  |  |  | #{start}, #{count} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | delete from ba_block | 
|---|
|  |  |  | where id = #{id,jdbcType=BIGINT} | 
|---|
|  |  |  | </delete> | 
|---|
|  |  |  | <delete id="deleteLogicById" parameterType="java.lang.Long"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | update ba_block set deleted = 1 | 
|---|
|  |  |  | where id = #{id,jdbcType=BIGINT} | 
|---|
|  |  |  | </delete> | 
|---|
|  |  |  | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoBa.BaBlock"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | insert into ba_block (id, `name`, `header`, phone, area, color, deleted) | 
|---|
|  |  |  | 
|---|
|  |  |  | #{phone,jdbcType=VARCHAR}, | 
|---|
|  |  |  | #{area,jdbcType=INTEGER}, | 
|---|
|  |  |  | #{color,jdbcType=VARCHAR}, | 
|---|
|  |  |  | #{deleted,jdbcType=TINYINT}) | 
|---|
|  |  |  | #{deleted,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT}) | 
|---|
|  |  |  | </insert> | 
|---|
|  |  |  | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoBa.BaBlock"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | 
|---|
|  |  |  | #{color,jdbcType=VARCHAR}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="deleted != null"> | 
|---|
|  |  |  | #{deleted,jdbcType=TINYINT}, | 
|---|
|  |  |  | #{deleted,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | </insert> | 
|---|
|  |  |  | 
|---|
|  |  |  | color = #{color,jdbcType=VARCHAR}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="deleted != null"> | 
|---|
|  |  |  | color = #{deleted,jdbcType=TINYINT}, | 
|---|
|  |  |  | color = #{deleted,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </set> | 
|---|
|  |  |  | where id = #{id,jdbcType=BIGINT} | 
|---|
|  |  |  | 
|---|
|  |  |  | phone = #{phone,jdbcType=VARCHAR}, | 
|---|
|  |  |  | area = #{area,jdbcType=INTEGER}, | 
|---|
|  |  |  | color = #{color,jdbcType=VARCHAR}, | 
|---|
|  |  |  | deleted = #{deleted,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_block | 
|---|
|  |  |  | where id = #{id,jdbcType=BIGINT} | 
|---|
|  |  |  | </delete> | 
|---|
|  |  |  | <delete id="deleteLogicById" parameterType="java.lang.Long"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | update ba_block set deleted = 1 | 
|---|
|  |  |  | where id = #{id,jdbcType=BIGINT} | 
|---|
|  |  |  | </delete> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </mapper> | 
|---|