uu 配送费
This commit is contained in:
@@ -287,17 +287,19 @@ func OnWaybillMsg(req *uuptapi.WaybillCallbackParam) (resp *uuptapi.CallbackResp
|
|||||||
Remark: req.StateText,
|
Remark: req.StateText,
|
||||||
}
|
}
|
||||||
var good *model.GoodsOrder
|
var good *model.GoodsOrder
|
||||||
|
var reallyPrice int64
|
||||||
sql := `SELECT * FROM goods_order WHERE vendor_order_id = ? ORDER BY order_created_at DESC LIMIT 1 OFFSET 0`
|
sql := `SELECT * FROM goods_order WHERE vendor_order_id = ? ORDER BY order_created_at DESC LIMIT 1 OFFSET 0`
|
||||||
sqlParams := []interface{}{req.OriginID}
|
sqlParams := []interface{}{req.OriginID}
|
||||||
dao.GetRow(dao.GetDB(), &good, sql, sqlParams)
|
dao.GetRow(dao.GetDB(), &good, sql, sqlParams)
|
||||||
globals.SugarLogger.Debugf("uupt OnWaybillMsg good=====%s ", utils.Format4Output(good, false))
|
globals.SugarLogger.Debugf("uupt OnWaybillMsg good=====%s ", utils.Format4Output(good, false))
|
||||||
param.OrderVendorID = good.VendorID
|
param.OrderVendorID = good.VendorID
|
||||||
//查询运单价格
|
//查询运单价格
|
||||||
uuPrice, err := api.UuAPI.GetOrderDetail(req.OrderCode)
|
if uuPrice, err := api.UuAPI.GetOrderDetail(req.OrderCode); err != nil {
|
||||||
if err != nil {
|
|
||||||
globals.SugarLogger.Debugf("uuGetPrice err====%v", err)
|
globals.SugarLogger.Debugf("uuGetPrice err====%v", err)
|
||||||
|
reallyPrice = 0
|
||||||
|
} else {
|
||||||
|
reallyPrice = utils.Str2Int64(uuPrice.OrderPrice) - utils.Str2Int64(uuPrice.PriceOff)
|
||||||
}
|
}
|
||||||
reallyPrice := utils.Str2Int64(uuPrice.OrderPrice) - utils.Str2Int64(uuPrice.PriceOff)
|
|
||||||
switch req.State {
|
switch req.State {
|
||||||
case uuptapi.StateConfirmSuccess:
|
case uuptapi.StateConfirmSuccess:
|
||||||
param.Status = model.WaybillStatusNew //5 待调度
|
param.Status = model.WaybillStatusNew //5 待调度
|
||||||
|
|||||||
Reference in New Issue
Block a user