jds订单转移
This commit is contained in:
@@ -1630,6 +1630,17 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int)
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
order.Status = model.OrderStatusNew
|
order.Status = model.OrderStatusNew
|
||||||
|
if order.ActualPayPrice == 0 {
|
||||||
|
msg, err := jdshop.GetJdsOrder(order.VendorOrderID2)
|
||||||
|
if err == nil {
|
||||||
|
if jxutils.StandardPrice2Int(utils.Str2Float64(msg.OrderPayment)) == 0 {
|
||||||
|
order.ActualPayPrice = jxutils.StandardPrice2Int(utils.Str2Float64(msg.OrderTotalPrice) + utils.Str2Float64(msg.FreightPrice) - utils.Str2Float64(msg.SellerDiscount))
|
||||||
|
} else {
|
||||||
|
order.ActualPayPrice = jxutils.StandardPrice2Int(utils.Str2Float64(msg.OrderPayment))
|
||||||
|
}
|
||||||
|
order.TotalShopMoney = utils.Float64TwoInt64(float64(order.ActualPayPrice) * jdshopapi.JdsPayPercentage)
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
order.VendorOrderID2 = order.VendorOrderID
|
order.VendorOrderID2 = order.VendorOrderID
|
||||||
order.VendorOrderID = utils.Int64ToStr(jxutils.GenOrderNo())
|
order.VendorOrderID = utils.Int64ToStr(jxutils.GenOrderNo())
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ func result2Orders(msg *jdshopapi.CallBackResult) (order *model.GoodsOrder, err
|
|||||||
}
|
}
|
||||||
billParams, _ := GetDaDaBillParams(dao.GetDB(), order)
|
billParams, _ := GetDaDaBillParams(dao.GetDB(), order)
|
||||||
if result, err := api.DadaAPI.QueryDeliverFee(billParams); err == nil {
|
if result, err := api.DadaAPI.QueryDeliverFee(billParams); err == nil {
|
||||||
if jxutils.StandardPrice2Int(result.Fee) > 10 {
|
if result.Fee > 10 {
|
||||||
buildOrderTo102919(order)
|
buildOrderTo102919(order)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user