结账报错优化
This commit is contained in:
@@ -45,7 +45,7 @@ func (p *PurchaseHandler) OrderFinancialDetail2Refund(orderFinancial *model.Orde
|
||||
VendorID: model.VendorIDMTWM,
|
||||
AfsOrderID: orderData.Get("order_id"),
|
||||
VendorOrderID: orderData.Get("order_id"),
|
||||
AfsCreateAt: utils.Timestamp2Time(utils.Str2Int64(orderData.Get("timestamp"))),
|
||||
AfsCreateAt: utils.Timestamp2Time(utils.Str2Int64WithDefault(orderData.Get("timestamp"), 0)),
|
||||
// BoxMoney: orderFinancial.BoxMoney,
|
||||
// SkuBoxMoney: orderFinancial.SkuBoxMoney, // 美团的餐盒费已经拆到单条SKU里面去了,退款时直接计算用户支付sku金额就好了
|
||||
FreightUserMoney: orderFinancial.FreightMoney,
|
||||
@@ -96,6 +96,12 @@ func (p *PurchaseHandler) AfsOrderDetail2Financial(orderData url.Values) (afsOrd
|
||||
AfsCreateAt: utils.Timestamp2Time(utils.Str2Int64(orderData.Get("timestamp"))),
|
||||
RefundMoney: jxutils.StandardPrice2Int(utils.Str2Float64(orderData.Get("money"))),
|
||||
}
|
||||
// if orderData.Get("timestamp") != "" {
|
||||
// afsOrder.AfsCreateAt = utils.Timestamp2Time(utils.Str2Int64(orderData.Get("timestamp")))
|
||||
// } else {
|
||||
// globals.SugarLogger.Warnf("ebai OrderFinancialDetail2Refund timestamp is not found in afsOrder:%s", afsOrder.AfsOrderID)
|
||||
// afsOrder.AfsCreateAt = time.Now()
|
||||
// }
|
||||
order, err := partner.CurOrderManager.LoadOrder(afsOrder.VendorOrderID, afsOrder.VendorID)
|
||||
if err == nil {
|
||||
afsOrder.JxStoreID = order.JxStoreID
|
||||
@@ -113,7 +119,7 @@ func (p *PurchaseHandler) AfsOrderDetail2Financial(orderData url.Values) (afsOrd
|
||||
VendorOrderID: afsOrder.VendorOrderID,
|
||||
// ConfirmTime: afsOrder.AfsCreateAt,
|
||||
VendorSkuID: utils.Interface2String(xMap["app_food_code"]),
|
||||
SkuID: int(utils.Str2Int64(utils.Interface2String(xMap["sku_id"]))),
|
||||
SkuID: int(utils.Str2Int64WithDefault(utils.Interface2String(xMap["sku_id"]), 0)),
|
||||
Name: utils.Interface2String(xMap["food_name"]),
|
||||
UserMoney: jxutils.StandardPrice2Int(utils.MustInterface2Float64(xMap["refund_price"]))*utils.MustInterface2Int64(xMap["count"]) + jxutils.StandardPrice2Int(utils.MustInterface2Float64(xMap["box_price"]))*int64(utils.MustInterface2Float64(xMap["box_num"])),
|
||||
IsAfsOrder: 1,
|
||||
|
||||
Reference in New Issue
Block a user