liurunyu
2023-11-14 b494774d65b967eda829615118676a83712992b0
pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaBlockMapper.xml
@@ -23,25 +23,24 @@
    from ba_block
    where id = #{id,jdbcType=BIGINT}
  </select>
  <select id="selectTotal" parameterType="java.lang.Long" resultType="java.lang.Long">
    <!--@mbg.generated-->
  <select id="selectTotal" parameterType="java.util.Map" resultType="java.lang.Long">
    select
    count(*)
    from ba_block
    <trim prefix="where ">
      <if test="name != null">
        name like '%#{name,jdbcType=VARCHAR}%' and
      </if>
      <if test="header != null">
        header = '#{header,jdbcType=VARCHAR}' and
      </if>
      <if test="phone != null">
        phone = '#{phone,jdbcType=VARCHAR}' and
      </if>
      <if test="area != null">
        area = #{area,jdbcType=INTEGER}
      </if>
    </trim>
      <trim prefix="where ">
        <if test="name != null">
          name like '%#{name,jdbcType=VARCHAR}%' and
        </if>
        <if test="header != null">
          header = '#{header,jdbcType=VARCHAR}' and
        </if>
        <if test="phone != null">
          phone = '#{phone,jdbcType=VARCHAR}' and
        </if>
        <if test="area != null">
          area = #{area,jdbcType=INTEGER}
        </if>
      </trim>
  </select>
  <select id="selectSome" parameterType="java.util.Map" resultMap="BaseResultMap">
    <!--@mbg.generated-->
@@ -62,9 +61,10 @@
        area = #{area,jdbcType=INTEGER}
      </if>
    </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>
@@ -88,7 +88,7 @@
            #{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-->
@@ -136,7 +136,7 @@
        #{color,jdbcType=VARCHAR},
      </if>
      <if test="deleted != null">
        #{deleted,jdbcType=TINYINT},
        #{deleted,typeHandler=com.dy.common.mybatis.envm.EnumCodeTypeHandler, jdbcType=TINYINT},
      </if>
    </trim>
  </insert>
@@ -160,7 +160,7 @@
        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}
@@ -173,7 +173,7 @@
      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>
</mapper>