Browse Source

Merge branch 'estimateCost'

pjzs_starttask_update
shanji 2 years ago
parent
commit
7144f48379
  1. 10
      BBWY.Server.Business/Sync/OrderEstimateCostSyncBusiness.cs

10
BBWY.Server.Business/Sync/OrderEstimateCostSyncBusiness.cs

@ -206,7 +206,7 @@ namespace BBWY.Server.Business
var orderSkuAndRecentList = fsql.Select<OrderSku, SkuRecentCost>()
.LeftJoin((osku, src) => osku.SkuId == src.SkuId)
.Where((osku, src) => orderIdList.Contains(osku.SkuId) && osku.Price > 0)
.Where((osku, src) => orderIdList.Contains(osku.OrderId) && osku.Price > 0)
.ToList((osku, src) => new
{
osku.Id,
@ -291,6 +291,14 @@ namespace BBWY.Server.Business
insertOrderCostDetailList.AddRange(currentOrderInsertOcdList);
insertOrderCostList.Add(orderCost);
}
fsql.Transaction(() =>
{
if (insertOrderCostDetailList.Count() > 0)
fsql.Insert(insertOrderCostDetailList).ExecuteAffrows();
if (insertOrderCostList.Count() > 0)
fsql.Insert(insertOrderCostList).ExecuteAffrows();
});
}
catch (Exception ex)
{

Loading…
Cancel
Save