aa
This commit is contained in:
@@ -1534,22 +1534,24 @@ func RefreshJdShopOrdersEarningPrice(ctx *jxcontext.Context, orderStartTime, ord
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, v := range results.BillList.Result {
|
||||
if v.DueAmount != 0 {
|
||||
order, err := partner.CurOrderManager.LoadOrder(utils.Int64ToStr(v.OrderID), model.VendorIDJD)
|
||||
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 results != nil {
|
||||
for _, v := range results.BillList.Result {
|
||||
if v.DueAmount != 0 {
|
||||
order, err := partner.CurOrderManager.LoadOrder(utils.Int64ToStr(v.OrderID), model.VendorIDJD)
|
||||
if order == nil || err != nil {
|
||||
continue
|
||||
}
|
||||
if order.NewEarningPrice == 0 {
|
||||
jxutils.RefreshOrderEarningPrice2(order, store.PayPercentage)
|
||||
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 {
|
||||
jxutils.RefreshOrderEarningPrice2(order, store.PayPercentage)
|
||||
}
|
||||
dao.UpdateEntity(db, order, "TotalShopMoney", "NewEarningPrice")
|
||||
}
|
||||
dao.UpdateEntity(db, order, "TotalShopMoney", "NewEarningPrice")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user