From 8b09fbc19a96b57bf1d0e4d7c79b51a76aeca554 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期五, 28 三月 2025 19:57:56 +0800 Subject: [PATCH] 修改bug --- UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserRedPacketRecordMapper.xml | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserRedPacketRecordMapper.xml b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserRedPacketRecordMapper.xml index 40cd667..c479923 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserRedPacketRecordMapper.xml +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserRedPacketRecordMapper.xml @@ -56,7 +56,6 @@ select id as id, money as money, - expirationTime as expirationTime, insertTime as insertTime, companyId as companyId, state as state, @@ -88,10 +87,12 @@ select a.id as id, a.money as money, - b.name as name + c.name as name, + DATE_FORMAT(a.insertTime, '%Y-%m-%d %H:%i:%s') as insertTime from t_user_red_packet_record a - left join t_company b on (a.companyId = b.id) - where a.state = 1 + left join t_user_activity_redenvelope b on (a.redPacketActivityId = b.id) + left join t_user_activity c on (b.userActivityId = c.id) + where a.state != 0 <if test="null != uid"> and a.userId = #{uid} </if> @@ -100,4 +101,9 @@ limit #{pageNum}, #{size} </if> </select> + + + <select id="queryRemainingAmount" resultType="double"> + select ifnull(sum(remainingAmount), 0) from t_user_red_packet_record where userId = #{uid} and state = 1 + </select> </mapper> \ No newline at end of file -- Gitblit v1.7.1