From 35309b932b738d5a8537e53207d28004a8da0f89 Mon Sep 17 00:00:00 2001 From: gongzuming <gongzuming> Date: 星期五, 20 九月 2024 17:17:04 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master-v2' --- src/main/resources/mapper/point/PointGoodMapper.xml | 44 +++++++++++++++++++++++--------------------- 1 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/main/resources/mapper/point/PointGoodMapper.xml b/src/main/resources/mapper/point/PointGoodMapper.xml index ca326e4..3a8ee5c 100644 --- a/src/main/resources/mapper/point/PointGoodMapper.xml +++ b/src/main/resources/mapper/point/PointGoodMapper.xml @@ -1,26 +1,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.PointGoodMapper"> - <select id="queryPage" resultType="com.mzl.flower.dto.response.point.PointGoodVO"> - select * from t_point_goods t where t.deleted= 0 - <if test="dto.name != null and dto.name != ''"> - and t.name like concat('%', #{dto.name}, '%') - </if> - <if test="dto.status != null and dto.status != ''"> - and t.status = #{dto.status} - </if> - order by t.update_time desc - </select> - <select id="queryList" resultType="com.mzl.flower.dto.response.point.PointGoodVO" - parameterType="com.mzl.flower.dto.request.point.PointGoodQueryDTO"> - select * from t_point_goods t where t.deleted= 0 - <if test="dto.name != null and dto.name != ''"> - and t.name like concat('%', #{dto.name}, '%') - </if> - <if test="dto.status != null and dto.status != ''"> - and t.status = #{dto.status} - </if> +<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() + ]]> - order by t.update_time desc + </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> \ No newline at end of file -- Gitblit v1.9.3