Commit 3a0ac105 authored by 吴春's avatar 吴春

提交代码

parent c536b505
......@@ -560,8 +560,8 @@ WHERE u.TenantId={tenantId} and u.MallBaseId={mallBaseId} and u.SuperiorId ={use
dmodel.OrderBy = " Id asc";
}
string sql = $@" select * from ( SELECT a.Id,a.Source,a.`Name`,a.AliasName,a.Photo, b.TotalCommission,b.Price,c.Commission,d.ChildrenNum,
(SELECT COUNT(*) from rb_member_user where FIND_IN_SET( Id ,(SELECT GetMemberChildrenList(a.Id)))) as AllChildrenNum ,
(SELECT COUNT(*) from rb_goods_order where OrderStatus!=7 and FIND_IN_SET( UserId ,(SELECT GetMemberChildrenList(a.Id)))) as OrderNum
0 as AllChildrenNum ,
0 as OrderNum
from rb_member_user as a
LEFT JOIN (SELECT UserId,MAX(TotalCommission) as TotalCommission,SUM(IFNULL(TotalCommission,0)-IFNULL(CommissionWithdrawal,0)) as Price from rb_distributor_info GROUP BY UserId) as b on a.Id=b.UserId
LEFT JOIN
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment