tb_shop_user_invite
This commit is contained in:
@@ -56,17 +56,16 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getOrderConsumeAmountByList" resultType="java.math.BigDecimal">
|
<select id="getOrderConsumeAmountByList" resultType="java.math.BigDecimal">
|
||||||
SELECT
|
SELECT IFNULL(SUM(ord.pay_amount), 0) AS totalAmount
|
||||||
IFNULL( SUM( ord.pay_amount ), 0 ) AS totalAmount
|
FROM tb_shop_user_invite invite
|
||||||
FROM
|
INNER JOIN tb_shop_user su on invite.shop_user_id = su.id
|
||||||
tb_shop_user su
|
INNER JOIN tb_order_info ord ON su.user_id = ord.user_id
|
||||||
INNER JOIN tb_order_info ord ON su.user_id = ord.user_id
|
and invite.shop_id = #{shopId}
|
||||||
AND ord.shop_id = #{shopId}
|
AND ord.shop_id = #{shopId}
|
||||||
AND ord.STATUS = 'done'
|
AND ord.STATUS = 'done'
|
||||||
AND ord.pay_type NOT IN ( 'vip_pay', 'credit_pay' )
|
AND ord.pay_type NOT IN ('vip_pay', 'credit_pay')
|
||||||
AND ord.paid_time >= su.invite_time
|
AND ord.paid_time >= invite.invite_time
|
||||||
WHERE
|
WHERE invite.distribution_user_id = #{inviterId}
|
||||||
su.distribution_user_id = #{inviterId}
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getOrderConsumeAmountById" resultType="java.math.BigDecimal">
|
<select id="getOrderConsumeAmountById" resultType="java.math.BigDecimal">
|
||||||
|
|||||||
Reference in New Issue
Block a user