后台服务
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.

83 line
2.9 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="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
  8. <result column="game_id" jdbcType="INTEGER" property="gameId" />
  9. <result column="status" jdbcType="INTEGER" property="status" />
  10. <result column="coupon_ids" jdbcType="VARCHAR" property="couponIds" />
  11. <result column="valid_start_date" jdbcType="TIMESTAMP" property="validStartDate" />
  12. <result column="valid_end_date" jdbcType="TIMESTAMP" property="validEndDate" />
  13. <result column="triggle_action" jdbcType="INTEGER" property="triggleAction" />
  14. <result column="play_limit" jdbcType="INTEGER" property="playLimit" />
  15. <result column="award_limit" jdbcType="INTEGER" property="awardLimit" />
  16. <result column="play_credit_limit" jdbcType="INTEGER" property="playCreditLimit" />
  17. <result column="play_credit" jdbcType="INTEGER" property="playCredit" />
  18. <result column="limit_type" jdbcType="INTEGER" property="limitType" />
  19. </resultMap>
  20. <sql id="allColumns">
  21. `id`,`tenant_id`,`parent_tenant_id`,`game_id`,`status`,`coupon_ids`,`valid_start_date`,`valid_end_date`,`triggle_action`,`play_limit`,`award_limit`,`play_credit_limit`,`play_credit`,`limit_type`
  22. </sql>
  23. <sql id="dynamicWhereConditions">
  24. where 1 = 1
  25. <if test=" null != id ">
  26. and `id` = #{id}
  27. </if>
  28. <if test=" null != tenantId and '' != tenantId">
  29. and `tenant_id` = #{tenantId}
  30. </if>
  31. <if test=" null != parentTenantId and '' != parentTenantId">
  32. and `parent_tenant_id` = #{parentTenantId}
  33. </if>
  34. <if test=" null != gameId ">
  35. and `game_id` = #{gameId}
  36. </if>
  37. <if test=" null != status ">
  38. and `status` = #{status}
  39. </if>
  40. <if test=" null != validStartDate ">
  41. and `valid_start_date` = #{validStartDate}
  42. </if>
  43. <if test=" null != validEndDate ">
  44. and `valid_end_date` = #{validEndDate}
  45. </if>
  46. <if test=" null != triggleAction ">
  47. and `triggle_action` = #{triggleAction}
  48. </if>
  49. <if test=" null != playLimit ">
  50. and `play_limit` = #{playLimit}
  51. </if>
  52. <if test=" null != awardLimit ">
  53. and `award_limit` = #{awardLimit}
  54. </if>
  55. <if test=" null != ids ">
  56. and id in
  57. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  58. #{idItem}
  59. </foreach>
  60. </if>
  61. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  62. </sql>
  63. <select id="findList" parameterType="com.iformall.domain.po.WxGame" resultMap="BaseResultMap">
  64. select <include refid="allColumns" /> from wx_game
  65. <include refid="dynamicWhereConditions" />
  66. </select>
  67. </mapper>