后台服务
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

71 righe
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.WxQuestionConfigMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxQuestionConfig">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  7. <result column="question_list" jdbcType="VARCHAR" property="questionList"/>
  8. <result column="coupon_type_list" jdbcType="VARCHAR" property="couponTypeList"/>
  9. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  10. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  11. <result column="status" jdbcType="INTEGER" property="status" />
  12. <result column="strength" jdbcType="INTEGER" property="strength" />
  13. </resultMap>
  14. <sql id="allColumns">
  15. `id`,`tenant_id`,`question_list`,`coupon_type_list`,`create_time`,`update_time`,`status`,`strength`
  16. </sql>
  17. <sql id="dynamicWhereConditions">
  18. where 1 = 1
  19. <if test=" null != id ">
  20. and `id` = #{id}
  21. </if>
  22. <if test=" null != tenantId ">
  23. and `tenant_id` = #{tenantId}
  24. </if>
  25. <if test=" null != questionList ">
  26. and JSON_CONTAINS(question_list,#{questionList})
  27. </if>
  28. <if test=" null != couponTypeList ">
  29. and JSON_CONTAINS(coupon_type_list,#{couponTypeList})
  30. </if>
  31. <if test=" null != createTime ">
  32. and `create_time` = #{createTime}
  33. </if>
  34. <if test=" null != updateTime ">
  35. and `update_time` = #{updateTime}
  36. </if>
  37. <if test=" null != status ">
  38. and `status` = #{status}
  39. </if>
  40. <if test=" null != strength ">
  41. and `strength` = #{strength}
  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.WxQuestionConfig" resultMap="BaseResultMap">
  52. select
  53. <include refid="allColumns"/>
  54. from wx_question_config
  55. <include refid="dynamicWhereConditions"/>
  56. </select>
  57. </mapper>