Commit 74e56461 authored by liudong1993's avatar liudong1993

1

parent 30e2e909
......@@ -316,7 +316,7 @@ or (t.OrderStatus =6 and t.LossFinishTime <='{demodel.FinishETime} 23:59:59'))";
string sql = $@"
SELECT t.*,cd.Commission
FROM RB_Ticket_Order t
left JOIN {(Config.IsOnline ? "uat_reborn_dmc" : "reborn_dmc")}.rb_appoint_op aop on aop.OrderId=o.OrderId and aop.ResourceType=8
left JOIN {(Config.IsOnline ? "uat_reborn_dmc" : "reborn_dmc")}.rb_appoint_op aop on aop.OrderId=t.OrderId and aop.ResourceType=8
left join (select d.OrderId,sum(d.Commission) as Commission from rb_ticket_commission_details d where d.Status =0 group by d.OrderId) cd on t.OrderId = cd.OrderId
WHERE {where}
group by t.OrderId
......@@ -445,7 +445,7 @@ SELECT sum(case when t2.OrderStatus <>2 then t2.Money else 0 end) as Money
,sum(case when t2.OrderStatus =2 then t2.GuestCount else 0 end) as CancelNum
select t.* from(
FROM RB_Ticket_Order t
left JOIN {(Config.IsOnline ? "uat_reborn_dmc" : "reborn_dmc")}.rb_appoint_op aop on aop.OrderId=o.OrderId and aop.ResourceType=8
left JOIN {(Config.IsOnline ? "uat_reborn_dmc" : "reborn_dmc")}.rb_appoint_op aop on aop.OrderId=t.OrderId and aop.ResourceType=8
WHERE {where} group by t.OrderId)t2 ";
return Get<RB_CRMTicket_Order_Extend>(sql, parameters).FirstOrDefault();
}
......
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