查询签到人数 bug
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user