This commit is contained in:
richboo111
2023-01-31 14:38:28 +08:00
parent 6838015666
commit c81346d0f7
2 changed files with 241 additions and 240 deletions

View File

@@ -45,7 +45,7 @@ func (s *DefScheduler) SelfDeliveringAndUpdateStatus(ctx *jxcontext.Context, ven
err = s.SelfDeliverDelivering(order, phone) err = s.SelfDeliverDelivering(order, phone)
} }
} else { } else {
if order.Status < model.OrderStatusDelivering || (order.VendorID == model.VendorIDDD && order.Status <= model.OrderStatusDelivering) { if order.Status < model.OrderStatusDelivering || (order.VendorID == model.VendorIDDD && order.Status < model.OrderStatusDelivering) {
err = s.Swtich2SelfDeliver(order, userName) err = s.Swtich2SelfDeliver(order, userName)
} else if order.VendorID == order.WaybillVendorID { // 状态为配送中,且是购物平台运单,不能转自送了 } else if order.VendorID == order.WaybillVendorID { // 状态为配送中,且是购物平台运单,不能转自送了
err = scheduler.ErrOrderStatusIsNotSuitable4CurOperation err = scheduler.ErrOrderStatusIsNotSuitable4CurOperation

View File

@@ -1,241 +1,242 @@
package tiktok_store package tiktok_store
import ( //
"errors" //import (
"git.rosy.net.cn/baseapi/platformapi/mtpsapi" // "errors"
shop_getStoreDetail_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_getStoreDetail/request" // "git.rosy.net.cn/baseapi/platformapi/mtpsapi"
superm_createVirtualMobile_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_createVirtualMobile/response" // shop_getStoreDetail_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_getStoreDetail/request"
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api" // superm_createVirtualMobile_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_createVirtualMobile/response"
"git.rosy.net.cn/baseapi/utils" // "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api"
"git.rosy.net.cn/jx-callback/business/jxutils" // "git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext" // "git.rosy.net.cn/jx-callback/business/jxutils"
"git.rosy.net.cn/jx-callback/business/model" // "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/jx-callback/business/model/dao" // "git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/business/partner" // "git.rosy.net.cn/jx-callback/business/model/dao"
"git.rosy.net.cn/jx-callback/globals" // "git.rosy.net.cn/jx-callback/business/partner"
"git.rosy.net.cn/jx-callback/globals/api" // "git.rosy.net.cn/jx-callback/globals"
"time" // "git.rosy.net.cn/jx-callback/globals/api"
) // "time"
//)
var ( //
curDeliveryHandler *DeliveryHandler //var (
) // curDeliveryHandler *DeliveryHandler
//)
type DeliveryHandler struct { //
} //type DeliveryHandler struct {
//}
func init() { //
if api.TiktokStore != nil { //func init() {
curDeliveryHandler = new(DeliveryHandler) // if api.TiktokStore != nil {
partner.RegisterDeliveryPlatform(curDeliveryHandler, true) // curDeliveryHandler = new(DeliveryHandler)
} // partner.RegisterDeliveryPlatform(curDeliveryHandler, true)
} // }
//}
func (c *DeliveryHandler) GetVendorID() int { //
return model.VendorIDDYPS //func (c *DeliveryHandler) GetVendorID() int {
} // return model.VendorIDDYPS
//}
func (c *DeliveryHandler) CreateStore(ctx *jxcontext.Context, storeDetail *dao.StoreDetail2) (vendorStoreID string, status int, err error) { //
return "", 0, errors.New("抖店暂不支持此操作") //func (c *DeliveryHandler) CreateStore(ctx *jxcontext.Context, storeDetail *dao.StoreDetail2) (vendorStoreID string, status int, err error) {
} // return "", 0, errors.New("抖店暂不支持此操作")
//}
func (c *DeliveryHandler) GetStore(ctx *jxcontext.Context, storeID int, vendorStoreID string) (storeDetail *dao.StoreDetail2, err error) { //
relInfo, err := dao.GetStoreDetailForDD(dao.GetDB(), storeID, model.VendorIDDD, vendorStoreID, "") //func (c *DeliveryHandler) GetStore(ctx *jxcontext.Context, storeID int, vendorStoreID string) (storeDetail *dao.StoreDetail2, err error) {
if err != nil { // relInfo, err := dao.GetStoreDetailForDD(dao.GetDB(), storeID, model.VendorIDDD, vendorStoreID, "")
return nil, errors.New("获取抖音平台账号信息失败,请重试") // if err != nil {
} // return nil, errors.New("获取抖音平台账号信息失败,请重试")
apiObj := getAPI(relInfo.VendorOrgCode) // }
if storeInfo, err := apiObj.GetStoreDetail(&shop_getStoreDetail_request.ShopGetStoreDetailParam{ // apiObj := getAPI(relInfo.VendorOrgCode)
StoreId: vendorStoreID, // if storeInfo, err := apiObj.GetStoreDetail(&shop_getStoreDetail_request.ShopGetStoreDetailParam{
}); err == nil { // StoreId: vendorStoreID,
storeDetail = &dao.StoreDetail2{ // }); err == nil {
Store: model.Store{ // storeDetail = &dao.StoreDetail2{
Name: storeInfo.StoreDetail.Store.Name, // Store: model.Store{
Tel1: storeInfo.StoreDetail.Store.Contact, // Name: storeInfo.StoreDetail.Store.Name,
Address: storeInfo.StoreDetail.Store.Address, // Tel1: storeInfo.StoreDetail.Store.Contact,
Lng: jxutils.StandardCoordinate2Int(utils.Str2Float64(storeInfo.StoreDetail.Store.Longitude)), // Address: storeInfo.StoreDetail.Store.Address,
Lat: jxutils.StandardCoordinate2Int(utils.Str2Float64(storeInfo.StoreDetail.Store.Latitude)), // Lng: jxutils.StandardCoordinate2Int(utils.Str2Float64(storeInfo.StoreDetail.Store.Longitude)),
}, // Lat: jxutils.StandardCoordinate2Int(utils.Str2Float64(storeInfo.StoreDetail.Store.Latitude)),
VendorID: model.VendorIDDYPS, // },
VendorStoreID: utils.Int64ToStr(storeInfo.StoreDetail.Store.StoreId), // VendorID: model.VendorIDDYPS,
CourierStatus: int(storeInfo.StoreDetail.Store.State), // VendorStoreID: utils.Int64ToStr(storeInfo.StoreDetail.Store.StoreId),
} // CourierStatus: int(storeInfo.StoreDetail.Store.State),
} else { // }
globals.SugarLogger.Debugf("GetStoreDetail err %s", err) // } else {
} // globals.SugarLogger.Debugf("GetStoreDetail err %s", err)
return storeDetail, err // }
} // return storeDetail, err
//}
func (c *DeliveryHandler) IsErrStoreNotExist(err error) bool { //
return false //func (c *DeliveryHandler) IsErrStoreNotExist(err error) bool {
} // return false
//}
func (c *DeliveryHandler) IsErrStoreExist(err error) bool { //
return false //func (c *DeliveryHandler) IsErrStoreExist(err error) bool {
} // return false
//}
// 呼叫运力并发货 //
func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee int64) (bill *model.Waybill, err error) { //// 呼叫运力并发货
return nil, nil //func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee int64) (bill *model.Waybill, err error) {
//relInfo, err := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, model.VendorIDDD, "") // return nil, nil
//if err != nil { // //relInfo, err := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, model.VendorIDDD, "")
// return nil, errors.New("获取抖音平台账号信息失败,请重试") // //if err != nil {
//} // // return nil, errors.New("获取抖音平台账号信息失败,请重试")
//apiObj := getAPI(relInfo.VendorOrgCode) // //}
//if order.VendorID != model.VendorIDDD { // //apiObj := getAPI(relInfo.VendorOrgCode)
// return nil, errors.New("非抖音平台店铺不可发抖音配送") // //if order.VendorID != model.VendorIDDD {
//} // // return nil, errors.New("非抖音平台店铺不可发抖音配送")
//bill = &model.Waybill{ // //}
// VendorOrderID: order.VendorOrderID, // //bill = &model.Waybill{
// OrderVendorID: order.VendorID, // // VendorOrderID: order.VendorOrderID,
// VendorWaybillID: order.VendorOrderID, //抖音配送订单号即运单号 // // OrderVendorID: order.VendorID,
// WaybillVendorID: model.VendorIDDYPS, // // VendorWaybillID: order.VendorOrderID, //抖音配送订单号即运单号
//} // // WaybillVendorID: model.VendorIDDYPS,
//if dispatcherFee, err := apiObj.GetDispatcherInfo(int64(order.StoreID), order.VendorOrderID, tiktok_api.DispatcherFeeTypeCall); err == nil { // //}
// bill.DesiredFee = dispatcherFee // //if dispatcherFee, err := apiObj.GetDispatcherInfo(int64(order.StoreID), order.VendorOrderID, tiktok_api.DispatcherFeeTypeCall); err == nil {
//} // // bill.DesiredFee = dispatcherFee
//if err := apiObj.ShopOrderDispatcher(utils.Str2Int64(order.VendorStoreID), order.VendorOrderID, tiktok_api.DispatcherFeeTypeCall); err != nil { // //}
// return nil, err // //if err := apiObj.ShopOrderDispatcher(utils.Str2Int64(order.VendorStoreID), order.VendorOrderID, tiktok_api.DispatcherFeeTypeCall); err != nil {
//} // // return nil, err
//delivery.OnWaybillCreated(bill) // //}
//return bill, nil // //delivery.OnWaybillCreated(bill)
} // //return bill, nil
//}
func (c *DeliveryHandler) CancelWaybill(bill *model.Waybill, cancelReasonID int, cancelReason string) (err error) { //
return nil //func (c *DeliveryHandler) CancelWaybill(bill *model.Waybill, cancelReasonID int, cancelReason string) (err error) {
//params := make(map[string]interface{}, 0) // return nil
//params["vendorOrderID"] = bill.VendorOrderID // //params := make(map[string]interface{}, 0)
//if localOrder, _, err := dao.GetOrders(dao.GetDB(), nil, false, false, "", "", false, []int{0}, false, "", params, 0, 0); err != nil { // //params["vendorOrderID"] = bill.VendorOrderID
// return errors.New("取消运单时获取平台门店ID失败请重试") // //if localOrder, _, err := dao.GetOrders(dao.GetDB(), nil, false, false, "", "", false, []int{0}, false, "", params, 0, 0); err != nil {
//} else { // // return errors.New("取消运单时获取平台门店ID失败请重试")
// if err = getAPI(bill.VendorOrgCode).ShopOrderDispatcher(utils.Str2Int64(localOrder[0].VendorStoreID), bill.VendorOrderID, tiktok_api.DispatcherFeeTypeCancel); err != nil { // //} else {
// return fmt.Errorf("抖音配送取消运力失败:%v", err) // // if err = getAPI(bill.VendorOrgCode).ShopOrderDispatcher(utils.Str2Int64(localOrder[0].VendorStoreID), bill.VendorOrderID, tiktok_api.DispatcherFeeTypeCancel); err != nil {
// } // // return fmt.Errorf("抖音配送取消运力失败:%v", err)
// bill.Status = model.WaybillStatusCanceled // // }
// bill.Remark = cancelReason // // bill.Status = model.WaybillStatusCanceled
// partner.CurOrderManager.OnWaybillStatusChanged(bill) // // bill.Remark = cancelReason
//} // // partner.CurOrderManager.OnWaybillStatusChanged(bill)
//return err // //}
} // //return err
//}
func (c *DeliveryHandler) GetWaybillFee(order *model.GoodsOrder) (deliveryFeeInfo *partner.WaybillFeeInfo, err error) { //
return nil, nil //func (c *DeliveryHandler) GetWaybillFee(order *model.GoodsOrder) (deliveryFeeInfo *partner.WaybillFeeInfo, err error) {
//relInfo, err := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, model.VendorIDDD, "") // return nil, nil
//if err != nil { // //relInfo, err := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, model.VendorIDDD, "")
// return nil, errors.New("获取抖音平台账号信息失败,请重试") // //if err != nil {
//} // // return nil, errors.New("获取抖音平台账号信息失败,请重试")
//if dispatcherFee, err := getAPI(relInfo.VendorOrgCode).GetDispatcherInfo(utils.Str2Int64(relInfo.VendorStoreID), order.VendorOrderID, tiktok_api.DispatcherFeeTypeCall); err == nil { // //}
// deliveryFeeInfo = &partner.WaybillFeeInfo{} // //if dispatcherFee, err := getAPI(relInfo.VendorOrgCode).GetDispatcherInfo(utils.Str2Int64(relInfo.VendorStoreID), order.VendorOrderID, tiktok_api.DispatcherFeeTypeCall); err == nil {
// deliveryFeeInfo.DeliveryFee = dispatcherFee // // deliveryFeeInfo = &partner.WaybillFeeInfo{}
//} // // deliveryFeeInfo.DeliveryFee = dispatcherFee
//return deliveryFeeInfo, err // //}
} // //return deliveryFeeInfo, err
func getDispatcherFee(storeID int64, vendorOrderID string, dispatcherType int32) int64 { //}
if relInfo, err := dao.GetStoreDetailForDD(dao.GetDB(), 0, model.VendorIDDD, utils.Int64ToStr(storeID), ""); err != nil { //func getDispatcherFee(storeID int64, vendorOrderID string, dispatcherType int32) int64 {
return 0 // if relInfo, err := dao.GetStoreDetailForDD(dao.GetDB(), 0, model.VendorIDDD, utils.Int64ToStr(storeID), ""); err != nil {
} else { // return 0
if dispatcherFee, err := getAPI(relInfo.VendorOrgCode).GetDispatcherInfo(storeID, vendorOrderID, dispatcherType); err == nil { // } else {
return 0 // if dispatcherFee, err := getAPI(relInfo.VendorOrgCode).GetDispatcherInfo(storeID, vendorOrderID, dispatcherType); err == nil {
} else { // return 0
return dispatcherFee // } else {
} // return dispatcherFee
} // }
} // }
func (c *DeliveryHandler) ComplaintRider(bill *model.Waybill, resonID int, resonContent string) (err error) { //}
return errors.New("抖店配送暂不支持此操作") //func (c *DeliveryHandler) ComplaintRider(bill *model.Waybill, resonID int, resonContent string) (err error) {
} // return errors.New("抖店配送暂不支持此操作")
//}
func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeisongId string) (rider *mtpsapi.RiderInfo, err error) { //
orderInfo, _, err := dao.GetOrders(dao.GetDB(), []int64{utils.Str2Int64(orderId)}, false, false, "", "", false, []int{0}, false, "", nil, 0, 0) //func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeisongId string) (rider *mtpsapi.RiderInfo, err error) {
if err != nil { // orderInfo, _, err := dao.GetOrders(dao.GetDB(), []int64{utils.Str2Int64(orderId)}, false, false, "", "", false, []int{0}, false, "", nil, 0, 0)
return nil, errors.New("获取本地门店账号信息失败,请重试") // if err != nil {
} // return nil, errors.New("获取本地门店账号信息失败,请重试")
if waybill, err := getAPI(orderInfo[0].VendorOrgCode).GetShipmentInfo(utils.Str2Int64(orderId), deliveryId, tiktok_api.ShipmentTypeInvoice); err != nil { // }
return nil, err // if waybill, err := getAPI(orderInfo[0].VendorOrgCode).GetShipmentInfo(utils.Str2Int64(orderId), deliveryId, tiktok_api.ShipmentTypeInvoice); err != nil {
} else { // return nil, err
rider = &mtpsapi.RiderInfo{ // } else {
OrderId: orderId, // rider = &mtpsapi.RiderInfo{
ThirdCarrierOrderId: mtPeisongId, // OrderId: orderId,
CourierName: waybill.RiderName, // ThirdCarrierOrderId: mtPeisongId,
CourierPhone: waybill.RiderPhone, // CourierName: waybill.RiderName,
LogisticsProviderCode: mtpsapi.DYPsCode, // CourierPhone: waybill.RiderPhone,
LogisticsStatus: int(waybill.ShipmentStatus), // LogisticsProviderCode: mtpsapi.DYPsCode,
LogisticsContext: tiktok_api.ShipmentStatus[waybill.ShipmentStatus], // LogisticsStatus: int(waybill.ShipmentStatus),
Latitude: waybill.RiderLatitude, // LogisticsContext: tiktok_api.ShipmentStatus[waybill.ShipmentStatus],
Longitude: waybill.RiderLongitude, // Latitude: waybill.RiderLatitude,
} // Longitude: waybill.RiderLongitude,
} // }
globals.SugarLogger.Debugf("DYPS GetRiderInfo rider======%s", utils.Format4Output(rider, false)) // }
return rider, nil // globals.SugarLogger.Debugf("DYPS GetRiderInfo rider======%s", utils.Format4Output(rider, false))
} // return rider, nil
//}
func CreateVirtualMobile(shopOrderID int64) (*superm_createVirtualMobile_response.SupermCreateVirtualMobileData, error) { //
if orderInfo, _, err := dao.GetOrders(dao.GetDB(), []int64{shopOrderID}, false, false, "", "", false, []int{0}, false, "", nil, 0, 0); err != nil { //func CreateVirtualMobile(shopOrderID int64) (*superm_createVirtualMobile_response.SupermCreateVirtualMobileData, error) {
return nil, errors.New("获取本地门店账号信息失败,请重试") // if orderInfo, _, err := dao.GetOrders(dao.GetDB(), []int64{shopOrderID}, false, false, "", "", false, []int{0}, false, "", nil, 0, 0); err != nil {
} else { // return nil, errors.New("获取本地门店账号信息失败,请重试")
if visMobile, err := getAPI(orderInfo[0].VendorOrgCode).CreateVirtualMobile(shopOrderID); err != nil { // } else {
return nil, err // if visMobile, err := getAPI(orderInfo[0].VendorOrgCode).CreateVirtualMobile(shopOrderID); err != nil {
} else { // return nil, err
return visMobile, nil // } else {
} // return visMobile, nil
} // }
} // }
//}
//订单状态回调 //
func OnWaybillMsg(tag, orderId string, data interface{}) (response *tiktok_api.CallbackResponse) { ////订单状态回调
req := data.(tiktok_api.ShipmentInfoData) //func OnWaybillMsg(tag, orderId string, data interface{}) (response *tiktok_api.CallbackResponse) {
param := &model.Waybill{ // req := data.(tiktok_api.ShipmentInfoData)
VendorOrderID: utils.Int64ToStr(req.ShopOrderID), // param := &model.Waybill{
VendorWaybillID: req.TrackNo, // VendorOrderID: utils.Int64ToStr(req.ShopOrderID),
VendorWaybillID2: utils.Int64ToStr(req.AfterSaleID), // VendorWaybillID: req.TrackNo,
WaybillVendorID: model.VendorIDDYPS, // VendorWaybillID2: utils.Int64ToStr(req.AfterSaleID),
OrderVendorID: model.VendorIDDD, // WaybillVendorID: model.VendorIDDYPS,
CourierName: req.RiderName, // OrderVendorID: model.VendorIDDD,
CourierMobile: req.RiderPhone, // CourierName: req.RiderName,
VendorStatus: utils.Int64ToStr(req.ShipmentStatus), // CourierMobile: req.RiderPhone,
StatusTime: utils.Str2Time(req.OccurredTime), // VendorStatus: utils.Int64ToStr(req.ShipmentStatus),
Remark: "", // StatusTime: utils.Str2Time(req.OccurredTime),
} // Remark: "",
if req.OccurredTime == "" { // }
param.StatusTime = time.Now() // if req.OccurredTime == "" {
} // param.StatusTime = time.Now()
dispatcherFee := getDispatcherFee(req.ShopID, utils.Int64ToStr(req.ShopOrderID), tiktok_api.DispatcherFeeTypeCall) // }
switch req.ShipmentStatus { // dispatcherFee := getDispatcherFee(req.ShopID, utils.Int64ToStr(req.ShopOrderID), tiktok_api.DispatcherFeeTypeCall)
case tiktok_api.ShipmentStatusCalling: //1 骑手呼叫中 // switch req.ShipmentStatus {
param.DesiredFee = dispatcherFee // case tiktok_api.ShipmentStatusCalling: //1 骑手呼叫中
param.Status = model.WaybillStatusNew //5 待调度 // param.DesiredFee = dispatcherFee
case tiktok_api.ShipmentStatusReceived: //2 骑手已接单 // param.Status = model.WaybillStatusNew //5 待调度
param.DesiredFee = dispatcherFee // case tiktok_api.ShipmentStatusReceived: //2 骑手已接单
param.Status = model.WaybillStatusCourierAssigned // param.DesiredFee = dispatcherFee
param.Remark = req.RiderName + "," + req.RiderPhone // param.Status = model.WaybillStatusCourierAssigned
case tiktok_api.ShipmentStatusArrived: //3 骑手已到达取货点 // param.Remark = req.RiderName + "," + req.RiderPhone
param.DesiredFee = dispatcherFee // case tiktok_api.ShipmentStatusArrived: //3 骑手已到达取货点
param.Status = model.WaybillStatusCourierArrived //80 到店 // param.DesiredFee = dispatcherFee
param.Remark = tiktok_api.ShipmentStatus[req.ShipmentStatus] // param.Status = model.WaybillStatusCourierArrived //80 到店
case tiktok_api.ShipmentStatusDelivering: //4 配送中 // param.Remark = tiktok_api.ShipmentStatus[req.ShipmentStatus]
param.Status = model.WaybillStatusDelivering // case tiktok_api.ShipmentStatusDelivering: //4 配送中
param.Remark = tiktok_api.ShipmentStatus[req.ShipmentStatus] // param.Status = model.WaybillStatusDelivering
case tiktok_api.ShipmentStatusRejected, tiktok_api.ShipmentStatusReturning, tiktok_api.ShipmentStatusReturned: //5 收货人已拒收,6 返回中,7 返回完成 // param.Remark = tiktok_api.ShipmentStatus[req.ShipmentStatus]
param.Status = model.WaybillStatusDeliverFailed // case tiktok_api.ShipmentStatusRejected, tiktok_api.ShipmentStatusReturning, tiktok_api.ShipmentStatusReturned: //5 收货人已拒收,6 返回中,7 返回完成
param.Remark = tiktok_api.ShipmentStatus[req.ShipmentStatus] // param.Status = model.WaybillStatusDeliverFailed
case tiktok_api.ShipmentStatusDelivered: // 8 订单妥投 // param.Remark = tiktok_api.ShipmentStatus[req.ShipmentStatus]
param.Status = model.WaybillStatusDelivered // case tiktok_api.ShipmentStatusDelivered: // 8 订单妥投
param.Remark = tiktok_api.ShipmentStatus[req.ShipmentStatus] // param.Status = model.WaybillStatusDelivered
case tiktok_api.ShipmentStatusCanceled: //9 订单取消 // param.Remark = tiktok_api.ShipmentStatus[req.ShipmentStatus]
param.Status = model.WaybillStatusCanceled // case tiktok_api.ShipmentStatusCanceled: //9 订单取消
param.Remark = tiktok_api.ShipmentStatus[req.ShipmentStatus] // param.Status = model.WaybillStatusCanceled
default: // param.Remark = tiktok_api.ShipmentStatus[req.ShipmentStatus]
globals.SugarLogger.Warnf("onWaybillMsg unknown shipmentStatus:%v", req.ShipmentStatus) // default:
} // globals.SugarLogger.Warnf("onWaybillMsg unknown shipmentStatus:%v", req.ShipmentStatus)
globals.SugarLogger.Debugf("DYPS onWaybillMsg param=====%s", utils.Format4Output(param, false)) // }
if err := partner.CurOrderManager.OnWaybillStatusChanged(param); err != nil { // globals.SugarLogger.Debugf("DYPS onWaybillMsg param=====%s", utils.Format4Output(param, false))
return tiktok_api.CallbackResponseErr(false) // if err := partner.CurOrderManager.OnWaybillStatusChanged(param); err != nil {
} // return tiktok_api.CallbackResponseErr(false)
return tiktok_api.CallbackResponseErr(true) // }
} // return tiktok_api.CallbackResponseErr(true)
//}
//以下为辅助函数 //
func getAPI(appOrgCode string) (apiObj *tiktok_api.API) { ////以下为辅助函数
apiObj = partner.CurAPIManager.GetAPI(model.VendorIDDD, appOrgCode).(*tiktok_api.API) //func getAPI(appOrgCode string) (apiObj *tiktok_api.API) {
return apiObj // apiObj = partner.CurAPIManager.GetAPI(model.VendorIDDD, appOrgCode).(*tiktok_api.API)
} // return apiObj
//}