修改订单配送费
This commit is contained in:
@@ -1490,3 +1490,23 @@ func AdjustJdsOrderSimple(ctx *jxcontext.Context, vendorOrderID string, skuID in
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func UpdateWaybillDesiredFee(ctx *jxcontext.Context, vendorOrderID string, desiredFee int) (err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
)
|
||||
order, _ := dao.GetSimpleOrder(db, vendorOrderID)
|
||||
if order == nil {
|
||||
return fmt.Errorf("未找到该订单!orderID: %v", vendorOrderID)
|
||||
}
|
||||
bill, err := partner.CurOrderManager.LoadWaybill(order.VendorWaybillID, order.WaybillVendorID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if bill == nil {
|
||||
return fmt.Errorf("未找到此订单对应的运单!orderID: %v", vendorOrderID)
|
||||
}
|
||||
bill.DesiredFee = int64(desiredFee)
|
||||
_, err = dao.UpdateEntity(db, bill, "DesiredFee")
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user