调整 蜂鸟
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/delivery"
|
||||
@@ -201,20 +200,23 @@ func (c *DeliveryHandler) GetWaybillFee(order *model.GoodsOrder) (deliveryFeeInf
|
||||
|
||||
// 订单状态
|
||||
func OnWaybillMsg(msg *fnpsapi.OrderStatusNottify) (resp *fnpsapi.CallbackResponse) {
|
||||
cc := &fnpsapi.OrderCallbackParam{}
|
||||
if err := utils.Map2StructByJson(msg.Param, cc, true); err != nil {
|
||||
globals.SugarLogger.Debugf("FNPS strconv.Atoi fail :[%s]", err)
|
||||
return fnpsapi.Err2CallbackResponse(err, "")
|
||||
}
|
||||
|
||||
order := &model.Waybill{
|
||||
VendorWaybillID: utils.Int64ToStr(msg.Param.OrderId),
|
||||
VendorWaybillID2: msg.Param.PartnerOrderCode,
|
||||
VendorWaybillID: utils.Int64ToStr(cc.OrderId),
|
||||
VendorWaybillID2: cc.PartnerOrderCode,
|
||||
WaybillVendorID: model.VendorIDFengNiao,
|
||||
CourierName: msg.Param.CarrierDriverName,
|
||||
CourierMobile: msg.Param.CarrierDriverPhone,
|
||||
VendorStatus: utils.Int2Str(msg.Param.OrderStatus),
|
||||
StatusTime: utils.Timestamp2Time(msg.Param.PushTime),
|
||||
Remark: msg.Param.Description,
|
||||
CourierName: cc.CarrierDriverName,
|
||||
CourierMobile: cc.CarrierDriverPhone,
|
||||
VendorStatus: utils.Int2Str(cc.OrderStatus),
|
||||
StatusTime: utils.Timestamp2Time(cc.PushTime),
|
||||
Remark: cc.Description,
|
||||
}
|
||||
if msg.Param.PushTime == 0 {
|
||||
order.StatusTime = time.Now()
|
||||
}
|
||||
order.VendorOrderID, order.OrderVendorID = jxutils.SplitUniversalOrderID(utils.Int64ToStr(msg.Param.OrderId))
|
||||
order.VendorOrderID, order.OrderVendorID = jxutils.SplitUniversalOrderID(cc.PartnerOrderCode)
|
||||
orderStatus, err := strconv.Atoi(order.VendorStatus)
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("FNPS strconv.Atoi fail :[%s]", err)
|
||||
|
||||
Reference in New Issue
Block a user