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

75 строки
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.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. <result column="award_limit" jdbcType="INTEGER" property="awardLimit" />
  15. </resultMap>
  16. <sql id="allColumns">
  17. `id`,`tenant_id`,`game_id`,`status`,`coupon_ids`,`valid_start_date`,`valid_end_date`,`triggle_action`,`play_limit`,`award_limit`
  18. </sql>
  19. <sql id="dynamicWhereConditions">
  20. where 1 = 1
  21. <if test=" null != id ">
  22. and `id` = #{id}
  23. </if>
  24. <if test=" null != tenantId ">
  25. and `tenant_id` like concat('%', #{tenantId},'%')
  26. </if>
  27. <if test=" null != gameId ">
  28. and `game_id` = #{gameId}
  29. </if>
  30. <if test=" null != status ">
  31. and `status` = #{status}
  32. </if>
  33. <if test=" null != validStartDate ">
  34. and `valid_start_date` = #{validStartDate}
  35. </if>
  36. <if test=" null != validEndDate ">
  37. and `valid_end_date` = #{validEndDate}
  38. </if>
  39. <if test=" null != triggleAction ">
  40. and `triggle_action` = #{triggleAction}
  41. </if>
  42. <if test=" null != playLimit ">
  43. and `play_limit` = #{playLimit}
  44. </if>
  45. <if test=" null != awardLimit ">
  46. and `award_limit` = #{awardLimit}
  47. </if>
  48. <if test=" null != ids ">
  49. and id in
  50. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  51. #{idItem}
  52. </foreach>
  53. </if>
  54. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  55. </sql>
  56. <select id="findList" parameterType="com.iformall.domain.po.WxGame" resultMap="BaseResultMap">
  57. select <include refid="allColumns" /> from wx_game
  58. <include refid="dynamicWhereConditions" />
  59. </select>
  60. </mapper>