From 28a60b0977d66b75fb9a2c3306840bc18ec271f6 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期二, 19 八月 2025 17:51:18 +0800
Subject: [PATCH] 会员支付相关

---
 cloud-server-activity/src/main/resources/mapper/UserPointsMerchandiseMapper.xml |   38 +++++++++++++++++++++++++++-----------
 1 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/cloud-server-activity/src/main/resources/mapper/UserPointsMerchandiseMapper.xml b/cloud-server-activity/src/main/resources/mapper/UserPointsMerchandiseMapper.xml
index bf457a0..6e93a78 100644
--- a/cloud-server-activity/src/main/resources/mapper/UserPointsMerchandiseMapper.xml
+++ b/cloud-server-activity/src/main/resources/mapper/UserPointsMerchandiseMapper.xml
@@ -26,18 +26,18 @@
 
         SELECT
         CASE tm.type
-        WHEN 1 THEN '实体购买'
-        WHEN 2 THEN '课包购买'
-        WHEN 3 THEN '门票购买'
-        WHEN 4 THEN '优惠券购买'
+        WHEN 1 THEN '兑换实体商品'
+        WHEN 2 THEN '兑换运动营商品'
+        WHEN 3 THEN '兑换门票'
+        WHEN 4 THEN '兑换优惠券'
         END AS consumeName ,DATE_FORMAT(pm.insertTime, '%m-%d %H:%i')as `consumeTime`,2 as type,CONCAT('-',tm.cash) as
-        consumeAmount
+        consumeAmount,
+        UNIX_TIMESTAMP(pm.insertTime) * 1000 as dateTime
         FROM t_user_points_merchandise pm
         LEFT JOIN t_points_merchandise tm ON tm.id = pm.pointsMerchandiseId
-        WHERE pm.pointsMerchandiseId IN(
-        SELECT id
-        FROM t_points_merchandise WHERE redemptionMethod IN (2,3)
-
+        WHERE pm.payStatus = 2 and pm.state = 1 and pm.pointsMerchandiseId IN(
+            SELECT id
+            FROM t_points_merchandise WHERE redemptionMethod IN (2,3)
         )
         <if test="null != monthStart and '' != monthStart and null != monthEnd and '' != monthEnd">
             and DATE_FORMAT(pm.insertTime, '%Y-%m-%d %H:%i:%s') between #{monthStart} and #{monthEnd}
@@ -45,7 +45,23 @@
         <if test="null != appUserId and '' != appUserId ">
             and pm.userId = #{appUserId}
         </if>
-
-
     </select>
+
+    <select id="getConsumeDetails1" resultType="com.dsh.activity.entity.ConsumeDetail">
+        SELECT
+        '兑换优惠券' AS consumeName ,
+        DATE_FORMAT(paymentTime, '%m-%d %H:%i') as `consumeTime`,
+        2 as type,
+        CONCAT('-',cash) as consumeAmount,
+        UNIX_TIMESTAMP(paymentTime) * 1000 as dateTime
+        FROM t_user_coupon_payment
+        where status = 2 and payType = 2
+        <if test="null != monthStart and '' != monthStart and null != monthEnd and '' != monthEnd">
+            and DATE_FORMAT(paymentTime, '%Y-%m-%d %H:%i:%s') between #{monthStart} and #{monthEnd}
+        </if>
+        <if test="null != appUserId and '' != appUserId ">
+            and userId = #{appUserId}
+        </if>
+    </select>
+
 </mapper>

--
Gitblit v1.7.1