1
This commit is contained in:
@@ -208,6 +208,14 @@ func (c *PurchaseHandler) onAfsOrderMsg(msg *mtwmapi.CallbackMsg) (retVal *mtwma
|
||||
order.TotalShopMoney = order.TotalShopMoney + jxutils.StandardPrice2Int(utils.Str2Float64(rd.RefundPartialEstimateCharge.SettleAmount))
|
||||
}
|
||||
}
|
||||
|
||||
orderSkuShopPriceList := make(map[int]int64, 0)
|
||||
orderSkuEarningPriceList := make(map[int]int64, 0)
|
||||
for _, os := range order.Skus {
|
||||
orderSkuShopPriceList[os.SkuID] = os.ShopPrice
|
||||
orderSkuEarningPriceList[os.SkuID] = os.EarningPrice
|
||||
}
|
||||
|
||||
switch order.EarningType {
|
||||
case model.EarningTypePoints: // 扣点
|
||||
//更新订单new_earning_price
|
||||
@@ -221,15 +229,7 @@ func (c *PurchaseHandler) onAfsOrderMsg(msg *mtwmapi.CallbackMsg) (retVal *mtwma
|
||||
order.NewEarningPrice = order.TotalShopMoney*int64(100-order.OrderPayPercentage/2)/int64(100) - waybill.DesiredFee
|
||||
}
|
||||
}
|
||||
dao.UpdateEntity(db, order, "TotalShopMoney", "NewEarningPrice")
|
||||
case model.EarningTypeQuote: // 报价
|
||||
orderSkuShopPriceList := make(map[int]int64, 0)
|
||||
orderSkuEarningPriceList := make(map[int]int64, 0)
|
||||
for _, os := range order.Skus {
|
||||
orderSkuShopPriceList[os.SkuID] = os.ShopPrice
|
||||
orderSkuEarningPriceList[os.SkuID] = os.EarningPrice
|
||||
}
|
||||
|
||||
for _, rd := range refundDetail {
|
||||
for _, rdw := range rd.WmAppRetailForOrderPartRefundList {
|
||||
switch rd.RefundType {
|
||||
@@ -250,7 +250,7 @@ func (c *PurchaseHandler) onAfsOrderMsg(msg *mtwmapi.CallbackMsg) (retVal *mtwma
|
||||
order.NewEarningPrice = order.EarningPrice
|
||||
}
|
||||
}
|
||||
dao.UpdateEntity(db, order, "TotalShopMoney", "ShopPrice", "EarningPrice")
|
||||
dao.UpdateEntity(db, order, "TotalShopMoney", "ShopPrice", "EarningPrice", "NewEarningPrice")
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("美团平台售后获取退款金额信息错误: = %v", err)
|
||||
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "美团平台售后获取退款金额信息错误", fmt.Sprintf("orderid := %d,%s,%v", model.VendorIDMTWM, order.VendorOrderID, err))
|
||||
|
||||
Reference in New Issue
Block a user