PointUserLogMapper.xml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ylx.point.mapper.PointUserLogMapper">
  6. <resultMap type="PointUserLog" id="PointUserLogResult">
  7. <result property="id" column="id" />
  8. <result property="openId" column="open_id" />
  9. <result property="activityId" column="activity_id" />
  10. <result property="activityName" column="activity_name" />
  11. <result property="taskId" column="task_id" />
  12. <result property="taskType" column="task_type" />
  13. <result property="points" column="points" />
  14. <result property="balanceAfter" column="balance_after" />
  15. <result property="sourceLogId" column="source_log_id" />
  16. <result property="bizOrderId" column="biz_order_id" />
  17. <result property="expireTime" column="expire_time" />
  18. <result property="isExpired" column="is_expired" />
  19. <result property="createTime" column="create_time" />
  20. <result property="opType" column="op_type" />
  21. <result property="month" column="month" />
  22. </resultMap>
  23. <select id="getUserPointLogList" resultType="com.ylx.point.domain.vo.UserPointLogVO">
  24. SELECT
  25. pul.activity_name AS activityName,
  26. pul.points AS points,
  27. pul.op_type AS opType,
  28. pul.create_time AS createTime
  29. FROM
  30. point_user_log pul
  31. <where>
  32. <if test="dto.openId != null and dto.openId != ''">
  33. and pul.open_id = #{dto.openId}
  34. </if>
  35. <if test="dto.opType != null and dto.opType != ''">
  36. AND pul.op_type = #{dto.opType}
  37. </if>
  38. </where>
  39. ORDER BY
  40. pul.create_time DESC
  41. </select>
  42. </mapper>