查询签到人数 bug

This commit is contained in:
GYJ
2024-12-28 14:30:33 +08:00
parent 5a305c2d43
commit f11c80b895
7 changed files with 24 additions and 14 deletions

View File

@@ -52,10 +52,19 @@
</select>
<select id="selectInviteSignCount" resultType="Integer">
select count(*)
from invite
inner join user_sign_record record on invite.invitee_user_id = record.user_id
where invite.user_id=#{userId}
SELECT
count(*)
FROM
tb_user tu
LEFT JOIN
(SELECT user_id
FROM orders
WHERE pay_way = 9
AND `status` = 1
GROUP BY user_id
HAVING COUNT(*) >= 3) sub_orders ON tu.user_id = sub_orders.user_id
WHERE
tu.inviter_code = #{code};
</select>
<select id="selectInviteSum" resultType="Double">
@@ -114,4 +123,4 @@
left join tb_user u on u.user_id=b.userId
</select>
</mapper>
</mapper>