This commit is contained in:
邹宗楠
2023-03-03 15:08:30 +08:00
parent a9416695ba
commit 6407af6136
6 changed files with 21 additions and 14 deletions

View File

@@ -291,11 +291,9 @@ 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)
globals.SugarLogger.Debugf("uupt OnWaybillMsg good=====%s ", utils.Format4Output(good, false))
param.OrderVendorID = good.VendorID
//查询运单价格
if uuPrice, err := api.UuAPI.GetOrderDetail(req.OrderCode); err != nil {
globals.SugarLogger.Debugf("uuGetPrice err====%v", err)
reallyPrice = 0
} else {
reallyPrice = int64((utils.Str2Float64(uuPrice.OrderPrice) - utils.Str2Float64(uuPrice.PriceOff)) * 100)
@@ -325,7 +323,6 @@ func OnWaybillMsg(req *uuptapi.WaybillCallbackParam) (resp *uuptapi.CallbackResp
default:
globals.SugarLogger.Warnf("onWaybillMsg unknown State:%v", req.State)
}
globals.SugarLogger.Debugf("UUPT onWaybillMsg param=====%s", utils.Format4Output(param, false))
if err := partner.CurOrderManager.OnWaybillStatusChanged(param); err != nil {
return uuptapi.Err2CallbackResponse(err)
}