@@ -129,7 +129,7 @@ where {where} group by oc.OrderId,oc.UserId,oc.Grade,oc.Type order by oc.Grade a
where+=$@" and o.{nameof(RB_Goods_Order.OrderStatus)} in(1,2,3,4,5,6)";
}
stringsql=$@"SELECT oc.OrderId,o.OrderNo,o.UserId,oc.Grade,o.OrderStatus as DistrbutionOrderSelectStatus,SUM(oc.Commission) as Commission
stringsql=$@"SELECT oc.OrderId,o.OrderNo,o.UserId,oc.Grade,oc.CommissionState,o.OrderStatus as DistrbutionOrderSelectStatus,SUM(oc.Commission) as Commission
FROM RB_Goods_OrderCommission oc
inner join rb_goods_order o on oc.OrderId = o.OrderId
left join rb_goods_orderaftersale oa on oc.OrderDetailId= oa.OrderDetialId and oa.Type=1 and oa.Status=0 and oa.ReOrderStatus in (2,3,4,5)