| <?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> |