Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 
 

54 рядки
2.2 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.iformall.mapper.WxFinancePrintTemplateMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxFinancePrintTemplate">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  7. <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
  8. <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
  9. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
  10. <result column="is_del" jdbcType="INTEGER" property="isDel"/>
  11. <result column="type" jdbcType="INTEGER" property="type"/>
  12. <result column="name" jdbcType="VARCHAR" property="name"/>
  13. <result column="content" jdbcType="VARCHAR" property="content"/>
  14. </resultMap>
  15. <sql id="allColumns">
  16. `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`is_del`,`type`,`name`,`content`
  17. </sql>
  18. <sql id="dynamicWhereConditions">
  19. where 1=1
  20. <if test=" null != id ">and `id` = #{id}</if>
  21. <if test=" null != tenantId and '' != tenantId">
  22. and `tenant_id` = #{tenantId}
  23. </if>
  24. <if test=" null != parentTenantId and '' != parentTenantId">
  25. and `parent_tenant_id` = #{parentTenantId}
  26. </if>
  27. <if test=" null != name and '' != name ">and name like concat('%', #{name},'%')</if>
  28. <if test=" null != isDel ">and `is_del` = #{isDel}</if>
  29. <if test=" null != type ">and `type` = #{type}</if>
  30. <if test=" null != ids ">
  31. and id in
  32. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  33. #{idItem}
  34. </foreach>
  35. </if>
  36. <if test=" null != sortColumns">order by ${sortColumns}</if>
  37. </sql>
  38. <select id="findList" parameterType="com.iformall.domain.po.WxFinancePrintTemplate" resultMap="BaseResultMap">
  39. select
  40. <include refid="allColumns"/>
  41. from wx_finance_print_template
  42. <include refid="dynamicWhereConditions"/>
  43. </select>
  44. <update id = "setIsDel" parameterType="HashMap">
  45. update wx_finance_print_template set is_del = #{isDel} where id = #{id} and `tenant_id` = #{tenantId}
  46. </update>
  47. </mapper>