| | |
| | | (select sum(e.amount) |
| | | from mall_order_info e |
| | | inner join mall_member b on e.member_id=b.ID |
| | | inner join mall_order_item c on e.id = c.order_id |
| | | where e.status in (2, 3, 4) and e.order_type=1 and (b.invite_id=a.invite_id or b.referrer_id=a.invite_id)) amount, |
| | | (select count(1) from mall_member e |
| | | inner join mall_order_info b on e.id=b.member_id and b.status in (2, 3, 4) |
| | |
| | | and b.invite_id=#{inviteId} |
| | | </if> |
| | | <if test="type == 2"> |
| | | and b.referrer_id = #{inviteId} |
| | | and FIND_IN_SET(#{inviteId},b.referrer_ids) |
| | | </if> |
| | | </where> |
| | | </select> |