aa
This commit is contained in:
@@ -1534,22 +1534,24 @@ func RefreshJdShopOrdersEarningPrice(ctx *jxcontext.Context, orderStartTime, ord
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
for _, v := range results.BillList.Result {
|
if results != nil {
|
||||||
if v.DueAmount != 0 {
|
for _, v := range results.BillList.Result {
|
||||||
order, err := partner.CurOrderManager.LoadOrder(utils.Int64ToStr(v.OrderID), model.VendorIDJD)
|
if v.DueAmount != 0 {
|
||||||
if order == nil || err != nil {
|
order, err := partner.CurOrderManager.LoadOrder(utils.Int64ToStr(v.OrderID), model.VendorIDJD)
|
||||||
continue
|
if order == nil || err != nil {
|
||||||
}
|
continue
|
||||||
store, _ := dao.GetStoreDetail(db, jxutils.GetSaleStoreIDFromOrder(order), order.VendorID, order.VendorOrgCode)
|
|
||||||
// stores, _ := dao.GetStoreList(db, []int{jxutils.GetSaleStoreIDFromOrder(order)}, nil, nil, nil, nil, "")
|
|
||||||
if store != nil {
|
|
||||||
if order.TotalShopMoney == 0 {
|
|
||||||
order.TotalShopMoney = utils.Float64TwoInt64(v.DueAmount * 100)
|
|
||||||
}
|
}
|
||||||
if order.NewEarningPrice == 0 {
|
store, _ := dao.GetStoreDetail(db, jxutils.GetSaleStoreIDFromOrder(order), order.VendorID, order.VendorOrgCode)
|
||||||
jxutils.RefreshOrderEarningPrice2(order, store.PayPercentage)
|
// stores, _ := dao.GetStoreList(db, []int{jxutils.GetSaleStoreIDFromOrder(order)}, nil, nil, nil, nil, "")
|
||||||
|
if store != nil {
|
||||||
|
if order.TotalShopMoney == 0 {
|
||||||
|
order.TotalShopMoney = utils.Float64TwoInt64(v.DueAmount * 100)
|
||||||
|
}
|
||||||
|
if order.NewEarningPrice == 0 {
|
||||||
|
jxutils.RefreshOrderEarningPrice2(order, store.PayPercentage)
|
||||||
|
}
|
||||||
|
dao.UpdateEntity(db, order, "TotalShopMoney", "NewEarningPrice")
|
||||||
}
|
}
|
||||||
dao.UpdateEntity(db, order, "TotalShopMoney", "NewEarningPrice")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user