Commit 5adcb40f authored by 吴春's avatar 吴春

提交diam

parent f6673e02
......@@ -37,7 +37,7 @@ namespace Mall.Repository.Product
{
where += $@" and oc.{nameof(RB_SmallShops_Commission.OrderId)}={dmodel.OrderId}";
}
if (dmodel.OrderDetailId > 0)
if (dmodel.OrderDetailId > 0)
{
where += $@" and oc.{nameof(RB_SmallShops_Commission.OrderDetailId)}={dmodel.OrderDetailId}";
}
......@@ -183,7 +183,7 @@ where {where} group by oc.OrderId,o.OrderNo,oc.UserId,oc.Type order by oc.OrderI
string sql = $@"SELECT SUM(Commission) as Commission FROM RB_SmallShops_Commission 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)
WHERE oc.UserId={userId} and o.OrderStatus in (1,2,3,4,5,6) and o.Recycled=2 and oa.ReOrderId is null";
WHERE oc.UserId={userId} and o.OrderStatus in (1,2,3,4,5,6) and o.Recycled=2 and oa.ReOrderId is null and oc.type=1 ";
var obj = ExecuteScalar(sql);
if (obj != null)
......@@ -204,7 +204,7 @@ left join rb_goods_orderaftersale oa on oc.OrderDetailId= oa.OrderDetialId and o
string sql = $@"SELECT SUM(Commission) as Commission FROM RB_SmallShops_Commission 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)
WHERE oc.UserId={userId} and oc.CommissionState=1 and o.OrderStatus in (1,2,3,4,5,6) and o.Recycled=2 and oa.ReOrderId is null";
WHERE oc.UserId={userId} and oc.CommissionState=1 and o.OrderStatus in (1,2,3,4,5,6) and o.Recycled=2 and oa.ReOrderId is null and oc.type=1 ";
var obj = ExecuteScalar(sql);
if (obj != null)
......
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