1
This commit is contained in:
@@ -47,6 +47,7 @@ func (c *PurchaseHandler) onWaybillMsg(msg *ebaiapi.CallbackMsg) (retVal *ebaiap
|
|||||||
} else {
|
} else {
|
||||||
order.CourierName = utils.Interface2String(result["name"])
|
order.CourierName = utils.Interface2String(result["name"])
|
||||||
order.CourierMobile = utils.Interface2String(result["phone"])
|
order.CourierMobile = utils.Interface2String(result["phone"])
|
||||||
|
|
||||||
}
|
}
|
||||||
if order.Status == model.WaybillStatusNew {
|
if order.Status == model.WaybillStatusNew {
|
||||||
order2, _ := partner.CurOrderManager.LoadOrder(order.VendorOrderID, order.WaybillVendorID)
|
order2, _ := partner.CurOrderManager.LoadOrder(order.VendorOrderID, order.WaybillVendorID)
|
||||||
@@ -80,7 +81,6 @@ func (c *PurchaseHandler) callbackMsg2Waybill(msg *ebaiapi.CallbackMsg) (retVal
|
|||||||
Status: c.GetWaybillStatusFromVendorStatus(vendorStatus),
|
Status: c.GetWaybillStatusFromVendorStatus(vendorStatus),
|
||||||
VendorStatus: vendorStatus,
|
VendorStatus: vendorStatus,
|
||||||
StatusTime: utils.Timestamp2Time(msg.Timestamp),
|
StatusTime: utils.Timestamp2Time(msg.Timestamp),
|
||||||
|
|
||||||
VendorOrgCode: msg.Source,
|
VendorOrgCode: msg.Source,
|
||||||
}
|
}
|
||||||
return retVal
|
return retVal
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package tiktok_store
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
superm_getShipmentInfo_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_getShipmentInfo/response"
|
superm_getShipmentInfo_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_getShipmentInfo/response"
|
||||||
superm_getStoreAutoCallRiderInfo_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_getStoreAutoCallRiderInfo/response"
|
superm_getStoreAutoCallRiderInfo_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_getStoreAutoCallRiderInfo/response"
|
||||||
superm_setStoreAutoCallRider_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_setStoreAutoCallRider/request"
|
superm_setStoreAutoCallRider_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_setStoreAutoCallRider/request"
|
||||||
@@ -53,6 +54,10 @@ func (c *PurchaseHandler) onWaybillMsg(tag, orderId string, data interface{}) *t
|
|||||||
|
|
||||||
func (c *PurchaseHandler) callbackMsg2Waybill(tag, orderId string, data interface{}) (retVal *model.Waybill) {
|
func (c *PurchaseHandler) callbackMsg2Waybill(tag, orderId string, data interface{}) (retVal *model.Waybill) {
|
||||||
req := data.(tiktok_api.ShipmentInfoData)
|
req := data.(tiktok_api.ShipmentInfoData)
|
||||||
|
tempRemark := ""
|
||||||
|
if req.ShipmentStatus == tiktok_api.ShipmentStatusReceived {
|
||||||
|
tempRemark = req.RiderName + "," + req.RiderPhone
|
||||||
|
}
|
||||||
return &model.Waybill{
|
return &model.Waybill{
|
||||||
VendorOrderID: utils.Int64ToStr(req.ShopOrderID),
|
VendorOrderID: utils.Int64ToStr(req.ShopOrderID),
|
||||||
OrderVendorID: model.VendorIDDD,
|
OrderVendorID: model.VendorIDDD,
|
||||||
@@ -64,7 +69,7 @@ func (c *PurchaseHandler) callbackMsg2Waybill(tag, orderId string, data interfac
|
|||||||
Status: c.GetWaybillStatusFromVendorStatus(utils.Int64ToStr(req.ShipmentStatus)),
|
Status: c.GetWaybillStatusFromVendorStatus(utils.Int64ToStr(req.ShipmentStatus)),
|
||||||
StatusTime: utils.Str2Time(req.OccurredTime),
|
StatusTime: utils.Str2Time(req.OccurredTime),
|
||||||
//StatusTime: getTimeFromTimestamp(utils.Str2Int64(req.OccurredTime)),
|
//StatusTime: getTimeFromTimestamp(utils.Str2Int64(req.OccurredTime)),
|
||||||
Remark: "",
|
Remark: tempRemark,
|
||||||
VendorOrgCode: utils.Int64ToStr(req.ShopID), //为抖音账号ID
|
VendorOrgCode: utils.Int64ToStr(req.ShopID), //为抖音账号ID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
package controllers
|
package controllers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/platformapi/uuptapi"
|
"git.rosy.net.cn/baseapi/platformapi/uuptapi"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
|
||||||
"git.rosy.net.cn/jx-callback/business/partner/delivery/uupt"
|
"git.rosy.net.cn/jx-callback/business/partner/delivery/uupt"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
|
||||||
"git.rosy.net.cn/jx-callback/globals/api"
|
"git.rosy.net.cn/jx-callback/globals/api"
|
||||||
"github.com/astaxie/beego/server/web"
|
"github.com/astaxie/beego/server/web"
|
||||||
"net/http"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type UuPtController struct {
|
type UuPtController struct {
|
||||||
@@ -18,7 +17,6 @@ type UuPtController struct {
|
|||||||
func (c *UuPtController) UuWaybillCallback() {
|
func (c *UuPtController) UuWaybillCallback() {
|
||||||
if c.Ctx.Input.Method() == http.MethodPost {
|
if c.Ctx.Input.Method() == http.MethodPost {
|
||||||
resp, callbackResponse := api.UuAPI.WaybillCallback(c.Ctx.Request)
|
resp, callbackResponse := api.UuAPI.WaybillCallback(c.Ctx.Request)
|
||||||
globals.SugarLogger.Debugf("UuWaybillCallback resp============%s", utils.Format4Output(resp, false))
|
|
||||||
if callbackResponse.ReturnCode == uuptapi.ReturnFail {
|
if callbackResponse.ReturnCode == uuptapi.ReturnFail {
|
||||||
c.Data["code"] = callbackResponse
|
c.Data["code"] = callbackResponse
|
||||||
c.ServeJSON()
|
c.ServeJSON()
|
||||||
|
|||||||
Reference in New Issue
Block a user