From 092e1895006b688ea8d71278d9fa39b1be7f61ed Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期六, 11 十月 2025 17:27:19 +0800
Subject: [PATCH] 订单代码上移到controller
---
framework/src/main/resources/mapper/lmk/StoreCouponClaimRecordMapper.xml | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/framework/src/main/resources/mapper/lmk/StoreCouponClaimRecordMapper.xml b/framework/src/main/resources/mapper/lmk/StoreCouponClaimRecordMapper.xml
index 3d21ff9..4f8091b 100644
--- a/framework/src/main/resources/mapper/lmk/StoreCouponClaimRecordMapper.xml
+++ b/framework/src/main/resources/mapper/lmk/StoreCouponClaimRecordMapper.xml
@@ -53,6 +53,8 @@
<result column="user_id" property="userId"/>
<result column="coupon_name" property="couponName"/>
<result column="claimTime" property="claimTime"/>
+ <result column="order_status" property="orderStatus"/>
+
</resultMap>
<select id="getPage" resultMap="BaseResultMapByManager">
@@ -75,15 +77,18 @@
lsccr.user_id,
lsccr.coupon_name,
lsccr.create_time AS claimTime,
- lsccr.coupon_id
+ lsccr.coupon_id,
+ lo.order_status
FROM
lmk_store_coupon_claim_record lsccr
INNER JOIN
- li_member_coupon lmc ON lmc.coupon_id = lsccr.coupon_id
- AND lmc.member_id = lsccr.user_id
+ li_member_coupon lmc ON lmc.id = lsccr.member_coupon_id
+ LEFT JOIN li_order lo ON lo.use_platform_member_coupon_id = lmc.id AND lo.delete_flag = 0
WHERE
lmc.delete_flag = 0
AND lsccr.delete_flag = 0
+ AND lmc.member_id = lsccr.user_id
+
<!-- 1. 浼氬憳鍚嶇О妯$硦鏌ヨ锛堝叧鑱攍i_member_coupon琛級 -->
<if test="query.memberName != null and query.memberName != ''">
AND lmc.member_name LIKE CONCAT('%', #{query.memberName}, '%')
@@ -132,15 +137,19 @@
lsccr.user_id,
lsccr.coupon_name,
lsccr.create_time AS claimTime,
- lsccr.coupon_id
+ lsccr.coupon_id,
+ lo.order_status
FROM
lmk_store_coupon_claim_record lsccr
INNER JOIN
- li_member_coupon lmc ON lmc.coupon_id = lsccr.coupon_id
+ li_member_coupon lmc ON lmc.id = lsccr.member_coupon_id
+ LEFT JOIN li_order lo ON lo.use_platform_member_coupon_id = lmc.id AND lo.delete_flag = 0
+
WHERE
lmc.delete_flag = 0
AND lsccr.delete_flag = 0
AND lmc.member_id = lsccr.user_id
+
<!-- 1. 浼氬憳鍚嶇О妯$硦鏌ヨ锛堝叧鑱攍i_member_coupon琛級 -->
<if test="query.memberName != null and query.memberName != ''">
AND lmc.member_name LIKE CONCAT('%', #{query.memberName}, '%')
--
Gitblit v1.8.0