过滤商品券

This commit is contained in:
齐天大圣 2024-01-16 16:08:41 +08:00
parent 4cddc769d1
commit b840bd3e99
2 changed files with 8 additions and 5 deletions

View File

@ -63,11 +63,12 @@
card_favorables.couponAmount,
card_favorables.couponContent,
card_favorables.cardRecordId,
card_favorables.endTime
card_favorables.endTime,
card_favorables.exclusiveFunction
from
(SELECT
'优惠券' AS couponType,
cf.NAME couponName ,cf.id id,cf.discount_amount couponAmount,cf.satisfied_amount couponContent,cfr.id cardRecordId, cfr.end_time endTime
cf.NAME couponName ,cf.id id,cf.discount_amount couponAmount,cf.satisfied_amount couponContent,cfr.id cardRecordId, cfr.end_time endTime, cf.exclusive_function exclusiveFunction
FROM
card_favorable cf
LEFT JOIN card_favorable_record cfr ON cf.id = cfr.card_favorable_id
@ -78,7 +79,7 @@
and cf.type != 1 UNION ALL
SELECT
'兑换券' AS couponType,
ce.NAME couponName, ce.id id, ce.count couponAmount, ce.use_instructions couponContent,cer.id cardRecordId, cer.out_time endTime
ce.NAME couponName, ce.id id, ce.count couponAmount, ce.use_instructions couponContent,cer.id cardRecordId, cer.out_time endTime, ce.qr_code_link exclusiveFunction
FROM
card_exchange_record cer
LEFT JOIN card_exchange ce ON cer.card_exchange_id = ce.id
@ -89,7 +90,7 @@
and cer.store_id = #{cardFavorableDTOS.storeId} UNION ALL
SELECT
'洗车券' AS couponType,
ce.NAME couponName, ce.id id, ce.count couponAmount, ce.use_instructions couponContent,cer.id cardRecordId, cer.out_time endTime
ce.NAME couponName, ce.id id, ce.count couponAmount, ce.use_instructions couponContent,cer.id cardRecordId, cer.out_time endTime, ce.qr_code_link exclusiveFunction
FROM
card_exchange_record cer
LEFT JOIN card_exchange ce ON cer.card_exchange_id = ce.id
@ -100,7 +101,7 @@
and cer.store_id = #{cardFavorableDTOS.storeId} UNION ALL
SELECT
'洗车卡' AS couponType,
ce.NAME couponName, ce.id id, ce.count couponAmount, ce.use_instructions couponContent,cer.id cardRecordId, cer.out_time endTime
ce.NAME couponName, ce.id id, ce.count couponAmount, ce.use_instructions couponContent,cer.id cardRecordId, cer.out_time endTime, ce.qr_code_link exclusiveFunction
FROM
card_exchange_record cer
LEFT JOIN card_exchange ce ON cer.card_exchange_id = ce.id

View File

@ -14,6 +14,8 @@ public class CouponVO implements Serializable {
private Integer cardRecordId;
//券类型
private String couponType;
//互斥功能 0满减活动 1储值卡付款
private String exclusiveFunction;
//券金额
private String couponAmount;
//券名称