后台服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.4 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.WxScoreRulesMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxScoreRules">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  7. <result column="rules" jdbcType="VARCHAR" property="rules"/>
  8. <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
  9. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
  10. <result column="type" jdbcType="INTEGER" property="type"/>
  11. <result column="clear_year" jdbcType="INTEGER" property="clearYear"/>
  12. <result column="scale" jdbcType="INTEGER" property="scale"/>
  13. <result column="credit_locked" jdbcType="INTEGER" property="creditLocked"/>
  14. </resultMap>
  15. <sql id="allColumns">
  16. `id`,`tenant_id`,`rules`,`create_date`,`update_date`,`type`,`clear_year`,`scale`,credit_locked
  17. </sql>
  18. <sql id="dynamicWhereConditions">
  19. where 1 = 1
  20. <if test=" null != id ">
  21. and `id` = #{id}
  22. </if>
  23. <if test=" null != tenantId ">
  24. and `tenant_id` = #{tenantId}
  25. </if>
  26. <if test=" null != createDate ">
  27. and `create_date` = #{createDate}
  28. </if>
  29. <if test=" null != updateDate ">
  30. and `update_date` = #{updateDate}
  31. </if>
  32. <if test=" null != type ">
  33. and `type` = #{type}
  34. </if>
  35. <if test=" null != clearYear ">
  36. and `clear_year` = #{clearYear}
  37. </if>
  38. <if test=" null != scale ">
  39. and `scale` = #{scale}
  40. </if>
  41. <if test=" null != creditLocked ">
  42. and `credit_locked` = #{creditLocked}
  43. </if>
  44. <if test=" null != ids ">
  45. and id in
  46. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  47. #{idItem}
  48. </foreach>
  49. </if>
  50. <if test=" null != sortColumns">order by ${sortColumns}</if>
  51. </sql>
  52. <select id="findList" parameterType="com.iformall.domain.po.WxScoreRules" resultMap="BaseResultMap">
  53. select
  54. <include refid="allColumns"/>
  55. from wx_score_rules
  56. <include refid="dynamicWhereConditions"/>
  57. </select>
  58. </mapper>