Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 

70 строки
2.5 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.WxFinancePrintDataMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxFinancePrintData">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="name" jdbcType="VARCHAR" property="name"/>
  7. <result column="is_del" jdbcType="INTEGER" property="isDel"/>
  8. <result column="remark" jdbcType="VARCHAR" property="remark"/>
  9. <result column="type" jdbcType="INTEGER" property="type"/>
  10. <result column="sort" jdbcType="INTEGER" property="sort"/>
  11. <result column="print_data_type" jdbcType="VARCHAR" property="printDataType"/>
  12. <result column="print_data_json" jdbcType="VARCHAR" property="printDataJson"/>
  13. <result column="is_edit" jdbcType="INTEGER" property="isEdit"/>
  14. <result column="default_value" jdbcType="VARCHAR" property="defaultValue"/>
  15. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  16. </resultMap>
  17. <sql id="allColumns">
  18. `id`,`name`,`is_del`,`remark`,`type`,`sort`,`print_data_type`,`print_data_json`,`is_edit`,`default_value`,`tenant_id`
  19. </sql>
  20. <sql id="dynamicWhereConditions">
  21. where id &gt; 0
  22. <if test=" null != id ">
  23. and `id` = #{id}
  24. </if>
  25. <if test=" null != name ">
  26. and `name` like concat('%', #{name},'%')
  27. </if>
  28. <if test=" null != isDel ">
  29. and `is_del` = #{isDel}
  30. </if>
  31. <if test=" null != type ">
  32. and `type` = #{type}
  33. </if>
  34. <if test=" null != sort ">
  35. and `sort` = #{sort}
  36. </if>
  37. <if test=" null != isEdit ">
  38. and `is_edit` = #{isEdit}
  39. </if>
  40. <if test=" null != tenantId ">
  41. and (`tenant_id` = #{tenantId} or `tenant_id` is null)
  42. </if>
  43. <if test=" null != ids ">
  44. and id in
  45. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  46. #{idItem}
  47. </foreach>
  48. </if>
  49. <if test=" null != sortColumns">order by ${sortColumns}</if>
  50. </sql>
  51. <select id="findList" parameterType="com.iformall.domain.po.WxFinancePrintData" resultMap="BaseResultMap">
  52. select
  53. <include refid="allColumns"/>
  54. from wx_finance_print_data
  55. <include refid="dynamicWhereConditions"/>
  56. </select>
  57. </mapper>