cloudroam
3 天以前 3a819e4f668c15e8b77b188b322470da12bb7a43
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.mzl.flower.mapper.point.PointGoodsRecordMapper">
    <update id="updateExpiredPointGoodsRecord">
        update t_point_goods_record p set p.`status`='E' where p.deleted = 0 and p.`status` = 'A' and
        <![CDATA[
            p.expire_time < NOW()
        ]]>
 
    </update>
 
    <select id="selectMyExchangeGoods" resultType="com.mzl.flower.dto.response.point.PointGoodsRecordDTO">
        SELECT
            *
        FROM
            t_point_goods_record p
        WHERE
            p.deleted = 0
          <if test="dto.userId != null and dto.userId != ''">
              AND p.user_id = #{dto.userId}
          </if>
          <if test="dto.status != null and dto.status != ''">
              AND p.`status` = #{dto.status}
          </if>
        ORDER BY
            p.create_time DESC
    </select>
</mapper>