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.
 
 
 
 
 

77 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.WxGameActionLogMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxGameActionLog">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
  7. <result column="game_id" jdbcType="BIGINT" property="gameId" />
  8. <result column="user_id" jdbcType="BIGINT" property="userId" />
  9. <result column="coupon_order_id" jdbcType="BIGINT" property="couponOrderId" />
  10. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  11. </resultMap>
  12. <sql id="allColumns">
  13. `id`,`tenant_id`,`coupon_id`,`coupon_order_id`,`channel_type`,`channel_id`,`create_time`
  14. </sql>
  15. <sql id="dynamicWhereConditions">
  16. where 1 = 1
  17. <if test=" null != id ">
  18. and `id` = #{id}
  19. </if>
  20. <if test=" null != tenantId ">
  21. and `tenant_id` = #{tenantId}
  22. </if>
  23. <if test=" null != gameId ">
  24. and `game_id` = #{gameId}
  25. </if>
  26. <if test=" null != userId ">
  27. and `user_id` = #{userId}
  28. </if>
  29. <if test=" null != couponOrderId ">
  30. and `coupon_order_id` = #{couponOrderId}
  31. </if>
  32. <if test=" null != createTime ">
  33. and `create_time` = #{createTime}
  34. </if>
  35. <if test=" null != startTime ">
  36. and `create_time` &gt;= #{startTime}
  37. </if>
  38. <if test=" null != endTime ">
  39. and `create_time` &lt;= #{endTime}
  40. </if>
  41. <if test=" null != ids ">
  42. and id in
  43. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  44. #{idItem}
  45. </foreach>
  46. </if>
  47. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  48. </sql>
  49. <select id="findList" parameterType="com.iformall.domain.po.WxGameActionLog" resultMap="BaseResultMap">
  50. select <include refid="allColumns" /> from wx_game_action_log
  51. <include refid="dynamicWhereConditions" />
  52. </select>
  53. <select id="getCount" resultType="java.lang.Integer" parameterType="com.iformall.domain.po.WxGameActionLog">
  54. select COUNT(*) FROM wx_game_action_log a
  55. <include refid="dynamicWhereConditions" />
  56. </select>
  57. </mapper>