@ -3,9 +3,9 @@
<mapper namespace="org.springblade.modules.weixin.mapper.WeChatUserMapper">
<select id="buyCount" resultType="org.springblade.modules.weixin.dto.BuyCount">
SELECT
a.buyer_phone AS phone,
count(a.buyer_phone) AS count
FROM eh_order AS a WHERE a.is_deleted = 0 GROUP BY a.buyer_phone
SELECT a.buyer_phone AS phone, COUNT(a.buyer_phone) AS `count`
FROM eh_order AS a
WHERE a.is_deleted = 0 AND `status` IN (2, 3, 4)
GROUP BY a.buyer_phone
</select>
</mapper>