统计有误修复

This commit is contained in:
张松
2025-03-21 13:54:30 +08:00
parent ebe6ca52dd
commit 9d969c60f0

View File

@@ -50,7 +50,9 @@
</select>
<select id="selectPageByKeyAndIsVip" resultType="com.czg.account.dto.shopuser.ShopUserDTO">
SELECT
a.*, count(c.id) couponNum, count(d.id) orderNumber, IFNULL(sum(f.amount), 0) rechargeAmount
a.*, COUNT(DISTINCT c.id) AS couponNum,
COUNT(DISTINCT d.id) AS orderNumber,
IFNULL(SUM(DISTINCT f.amount), 0) AS rechargeAmount
FROM
tb_shop_user a
LEFT JOIN tb_user_info b ON b.id = a.user_id