京东物流超重验证
This commit is contained in:
@@ -710,6 +710,7 @@ func CheckJdDeliveryWeight(ctx *jxcontext.Context) (err error) {
|
||||
return retVal, err
|
||||
}
|
||||
if waybill.DeliveryID == deliveryOrder.VendorWaybillID {
|
||||
deliveryOrder.IsWeight = 1
|
||||
if waybill.Weight > 3 && math.Floor(deliveryOrder.Weight) < math.Floor(waybill.Weight) {
|
||||
diffPrice := (math.Floor(waybill.Weight) - math.Floor(deliveryOrder.Weight)) * waybillKgPrice
|
||||
if err != nil {
|
||||
@@ -718,8 +719,10 @@ func CheckJdDeliveryWeight(ctx *jxcontext.Context) (err error) {
|
||||
if err = financial.AddExpendUpdateAccount(db, userBill, model.BillTypeJdWaybillOverWeight, utils.Float64TwoInt(diffPrice)); err != nil {
|
||||
return retVal, err
|
||||
}
|
||||
deliveryOrder.IsWeight = 2
|
||||
}
|
||||
}
|
||||
dao.UpdateEntity(db, deliveryOrder, "IsWeight")
|
||||
return retVal, err
|
||||
}, deliveryOrders)
|
||||
tasksch.HandleTask(task, nil, true).Run()
|
||||
|
||||
Reference in New Issue
Block a user