Merge branch 'jdshop' of e.coding.net:rosydev/jx-callback into jdshop

This commit is contained in:
邹宗楠
2023-02-06 15:59:34 +08:00
6 changed files with 90 additions and 37 deletions

View File

@@ -3,6 +3,7 @@ package tiktok_store
import (
"errors"
"fmt"
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_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) {
req := data.(tiktok_api.ShipmentInfoData)
tempRemark := ""
if req.ShipmentStatus == tiktok_api.ShipmentStatusReceived {
tempRemark = req.RiderName + "," + req.RiderPhone
}
return &model.Waybill{
VendorOrderID: utils.Int64ToStr(req.ShopOrderID),
OrderVendorID: model.VendorIDDD,
@@ -64,7 +69,7 @@ func (c *PurchaseHandler) callbackMsg2Waybill(tag, orderId string, data interfac
Status: c.GetWaybillStatusFromVendorStatus(utils.Int64ToStr(req.ShipmentStatus)),
StatusTime: utils.Str2Time(req.OccurredTime),
//StatusTime: getTimeFromTimestamp(utils.Str2Int64(req.OccurredTime)),
Remark: "",
Remark: tempRemark,
VendorOrgCode: utils.Int64ToStr(req.ShopID), //为抖音账号ID
}
}