stringsql=$@"SELECT OrderId,UserId,Grade,SUM(Commission) as Commission FROM RB_Goods_OrderCommission where {where} group by OrderId,UserId,Grade order by Grade asc";
stringsql=$@"SELECT OrderId,UserId,Grade,SUM(Commission) as Commission FROM RB_Goods_OrderCommission where {where} group by OrderId,UserId,Grade order by Grade asc";
stringsql=$" SELECT OrderStatus,COUNT(0) as OrderNum FROM rb_goods_order WHERE `Status`=0 and OrderStatus in (1,2,3) and UserId={userId} and TenantId={tenantId} and MallBaseId={mallBaseId}";
stringsql=$"SELECT COUNT(0) as OrderNum FROM rb_goods_orderaftersale WHERE `Status`=0 and ReOrderStatus <5 and UserId={userId} and TenantId={tenantId} and MallBaseId={mallBaseId}";
stringsql=$@"SELECT UserId,SUM(Income) as Income,count(0) as OrderNum FROM rb_goods_order WHERE OrderStatus in (2,3,4,5,6) and Recycled=2 and UserId in({userIds}) and TenantId={tenantId} and MallBaseId={mallBaseId}";
returnGet<RB_Goods_Order_Extend>(sql).ToList();
}
#region数据统计-数据概况
#region数据统计-数据概况
...
@@ -508,8 +579,7 @@ LEFT JOIN rb_goods_order as b on a.OrderId=b.OrderId
...
@@ -508,8 +579,7 @@ LEFT JOIN rb_goods_order as b on a.OrderId=b.OrderId
LEFT JOIN rb_goods as c on a.GoodsId=c.Id {where}
LEFT JOIN rb_goods as c on a.GoodsId=c.Id {where}
GROUP BY a.GoodsId ORDER BY SUM(a.Final_Price) desc LIMIT 100 ";
GROUP BY a.GoodsId ORDER BY SUM(a.Final_Price) desc LIMIT 100 ";