Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 

62 wiersze
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.WxGameMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxGame">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
  7. <result column="game_id" jdbcType="INTEGER" property="gameId" />
  8. <result column="status" jdbcType="INTEGER" property="status" />
  9. <result column="coupon_ids" jdbcType="VARCHAR" property="couponIds" />
  10. <result column="valid_start_date" jdbcType="TIMESTAMP" property="validStartDate" />
  11. <result column="valid_end_date" jdbcType="TIMESTAMP" property="validEndDate" />
  12. <result column="triggle_action" jdbcType="INTEGER" property="triggleAction" />
  13. <result column="play_limit" jdbcType="INTEGER" property="playLimit" />
  14. </resultMap>
  15. <sql id="allColumns">
  16. `id`,`tenant_id`,`game_id`,`status`,`coupon_ids`,`valid_start_date`,`valid_end_date`,`triggle_action`,`play_limit`
  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` like concat('%', #{tenantId},'%')
  25. </if>
  26. <if test=" null != gameId ">
  27. and `game_id` = #{gameId}
  28. </if>
  29. <if test=" null != status ">
  30. and `status` = #{status}
  31. </if>
  32. <if test=" null != validStartDate ">
  33. and `valid_start_date` = #{validStartDate}
  34. </if>
  35. <if test=" null != validEndDate ">
  36. and `valid_end_date` = #{validEndDate}
  37. </if>
  38. <if test=" null != triggleAction ">
  39. and `triggle_action` = #{triggleAction}
  40. </if>
  41. <if test=" null != playLimit ">
  42. and `play_limit` = #{playLimit}
  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.WxGame" resultMap="BaseResultMap">
  53. select <include refid="allColumns" /> from wx_game
  54. <include refid="dynamicWhereConditions" />
  55. </select>
  56. </mapper>