优惠券里外数量一致

This commit is contained in:
2025-09-28 17:15:04 +08:00
parent ed35c0a6be
commit 0b46c55ce9

View File

@@ -66,10 +66,11 @@
LEFT JOIN ( LEFT JOIN (
SELECT shop_user_id, COUNT(*) AS couponNum SELECT shop_user_id, COUNT(*) AS couponNum
FROM mk_shop_coupon_record FROM mk_shop_coupon_record
WHERE status = 0 WHERE
AND use_start_time < NOW() is_del = 0
AND use_end_time > NOW() # AND status = 0
AND is_del = 0 # AND use_start_time < NOW()
# AND use_end_time > NOW()
GROUP BY shop_user_id GROUP BY shop_user_id
) c ON c.shop_user_id = a.id ) c ON c.shop_user_id = a.id