| | |
| | | (select sum(e.amount) |
| | | from mall_order_info e |
| | | inner join mall_member b on e.member_id=b.ID |
| | | where e.status = 4 and find_in_set(a.invite_id, b.referrer_ids)) amount, |
| | | where e.status = 4 and e.comment_state = 2 and find_in_set(a.invite_id, b.referrer_ids)) amount, |
| | | (select count(1) from mall_order_info b |
| | | inner join mall_member e on e.id=b.member_id and b.status = 4 |
| | | inner join mall_member e on e.id=b.member_id and b.status = 4 and b.comment_state = 2 |
| | | where find_in_set(a.invite_id, e.referrer_ids)) orderCnt, |
| | | (select count(1) from mall_member x where find_in_set(a.invite_id, x.referrer_ids)) cnt |
| | | from mall_member a |
| | |
| | | FROM |
| | | mall_member e |
| | | INNER JOIN mall_order_info b ON e.id = b.member_id |
| | | AND b. STATUS = 4 |
| | | AND b.STATUS = 4 and b.comment_state = 2 |
| | | WHERE |
| | | e.invite_id = m.invite_id |
| | | OR e.referrer_id = m.invite_id |
| | |
| | | FROM mall_member m |
| | | left join data_dictionary_custom a on a.description = m.level |
| | | <where> |
| | | and m.level != '代理' |
| | | and m.level != 'VIP' |
| | | <if test="record != null" > |
| | | <if test="record.name!=null and record.name!=''"> |
| | | and m.name like concat('%', #{record.name},'%') |
| | |
| | | FROM |
| | | mall_member e |
| | | INNER JOIN mall_order_info b ON e.id = b.member_id |
| | | AND b. STATUS = 4 |
| | | AND b.STATUS = 4 |
| | | and b.comment_state = 2 |
| | | WHERE |
| | | e.invite_id = #{inviteId} |
| | | OR e.referrer_id = #{inviteId} |
| | |
| | | inner join mall_member b on a.member_id=b.ID |
| | | where 1=1 |
| | | and a.status = 4 |
| | | and a.comment_state = 2 |
| | | <if test="type == 1"> |
| | | and b.invite_id=#{inviteId} |
| | | </if> |
| | | <if test="type == 2"> |
| | | and find_in_set(#{inviteId}, b.referrer_ids) |
| | | and (find_in_set(#{inviteId}, b.referrer_ids) or b.invite_id=#{inviteId}) |
| | | </if> |
| | | </select> |
| | | |