uu 配送费
This commit is contained in:
@@ -290,29 +290,34 @@ func OnWaybillMsg(req *uuptapi.WaybillCallbackParam) (resp *uuptapi.CallbackResp
|
||||
sql := `SELECT * FROM goods_order WHERE vendor_order_id = ? ORDER BY order_created_at DESC LIMIT 1 OFFSET 0`
|
||||
sqlParams := []interface{}{req.OriginID}
|
||||
dao.GetRow(dao.GetDB(), &good, sql, sqlParams)
|
||||
//uuPrice, err := getOrderPrice(good)
|
||||
globals.SugarLogger.Debugf("uupt OnWaybillMsg good=====%s ", utils.Format4Output(good, false))
|
||||
param.OrderVendorID = good.VendorID
|
||||
//查询运单价格
|
||||
uuPrice, err := api.UuAPI.GetOrderDetail(req.OrderCode)
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("uuGetPrice err====%v", err)
|
||||
}
|
||||
reallyPrice := utils.Str2Int64(uuPrice.OrderPrice) - utils.Str2Int64(uuPrice.PriceOff)
|
||||
switch req.State {
|
||||
case uuptapi.StateConfirmSuccess:
|
||||
param.Status = model.WaybillStatusNew //5 待调度
|
||||
//param.DesiredFee = utils.Str2Int64(uuPrice.NeedPayMoney)
|
||||
param.DesiredFee = reallyPrice
|
||||
case uuptapi.StateRMGrabsOrder:
|
||||
param.Status = model.WaybillStatusCourierAssigned
|
||||
param.Remark = req.DriverName + "," + req.DriverMobile
|
||||
//param.DesiredFee = utils.Str2Int64(uuPrice.NeedPayMoney)
|
||||
param.DesiredFee = reallyPrice
|
||||
case uuptapi.StateArrivedStore:
|
||||
param.Status = model.WaybillStatusCourierArrived
|
||||
//param.DesiredFee = utils.Str2Int64(uuPrice.NeedPayMoney)
|
||||
param.DesiredFee = reallyPrice
|
||||
case uuptapi.StatePickUp:
|
||||
param.Status = model.WaybillStatusUuPickUp
|
||||
//param.DesiredFee = utils.Str2Int64(uuPrice.NeedPayMoney)
|
||||
param.DesiredFee = reallyPrice
|
||||
case uuptapi.StateArrivedDestination:
|
||||
param.Status = model.WaybillStatusUuArrivedDestination
|
||||
//param.DesiredFee = utils.Str2Int64(uuPrice.NeedPayMoney)
|
||||
param.DesiredFee = reallyPrice
|
||||
case uuptapi.StateReceiverGetGoods:
|
||||
param.Status = model.WaybillStatusDelivered
|
||||
//param.DesiredFee = utils.Str2Int64(uuPrice.NeedPayMoney)
|
||||
param.DesiredFee = reallyPrice
|
||||
case uuptapi.StateOrderCancel:
|
||||
param.Status = model.WaybillStatusCanceled
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user