京东刷新结算价
This commit is contained in:
@@ -1299,15 +1299,18 @@ func RefreshJdShopOrdersEarningPrice(ctx *jxcontext.Context, orderStartTime, ord
|
||||
}
|
||||
for _, v := range results.BillList.Result {
|
||||
if v.DueAmount != 0 {
|
||||
order := &model.GoodsOrder{}
|
||||
order.VendorOrderID = utils.Int64ToStr(v.OrderID)
|
||||
dao.GetEntity(db, order, "VendorOrderID")
|
||||
storeDeatil, _ := dao.GetStoreDetail(db, jxutils.GetSaleStoreIDFromOrder(order), order.VendorID)
|
||||
order.TotalShopMoney = utils.Float64TwoInt64(v.DueAmount * 100)
|
||||
if order.NewEarningPrice == 0 {
|
||||
jxutils.RefreshOrderEarningPrice2(order, storeDeatil.PayPercentage)
|
||||
order, _ := partner.CurOrderManager.LoadOrder(utils.Int64ToStr(v.OrderID), model.VendorIDJD)
|
||||
stores, _ := dao.GetStoreList(db, []int{jxutils.GetSaleStoreIDFromOrder(order)}, nil, nil, nil, "")
|
||||
if len(stores) > 0 {
|
||||
store := stores[0]
|
||||
if order.NewEarningPrice == 0 {
|
||||
jxutils.RefreshOrderEarningPrice2(order, store.PayPercentage)
|
||||
}
|
||||
if order.TotalShopMoney == 0 {
|
||||
order.TotalShopMoney = utils.Float64TwoInt64(v.DueAmount * 100)
|
||||
}
|
||||
dao.UpdateEntity(db, order, "TotalShopMoney", "NewEarningPrice")
|
||||
}
|
||||
dao.UpdateEntity(db, order, "TotalShopMoney", "NewEarningPrice")
|
||||
}
|
||||
}
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user