This commit is contained in:
邹宗楠
2023-11-03 18:49:29 +08:00
parent 7a8b29f1ad
commit 6e078bb1ca
2 changed files with 5 additions and 4 deletions

View File

@@ -39,7 +39,8 @@ func (a *API) GetDispatcherInfo(storeID int64, shopOrderID string, dispatcherFee
// ShopOrderDispatcher 取消运力,运力接口改版,取消和重新呼叫分开
func (a *API) ShopOrderDispatcher(storeID int64, shopOrderID string, dispatcherType int32) error {
if dispatcherType == DispatcherFeeTypeCancel { // 取消运力
switch dispatcherType {
case DispatcherFeeTypeCancel:
request := instantShopping_cancelDelivery_request.New()
request.Param = &instantShopping_cancelDelivery_request.InstantShoppingCancelDeliveryParam{
ShopOrderId: shopOrderID,
@@ -54,7 +55,7 @@ func (a *API) ShopOrderDispatcher(storeID int64, shopOrderID string, dispatcherT
return errors.New(response.SubMsg + ":" + response.LogId)
}
return nil
} else if dispatcherType == DispatcherFeeTypeCall { // 呼叫运力
case DispatcherFeeTypeCall:
request := instantShopping_createDelivery_request.New()
request.Param = &instantShopping_createDelivery_request.InstantShoppingCreateDeliveryParam{
ShopOrderId: shopOrderID,

View File

@@ -16,12 +16,12 @@ func TestGetDispatcherInfo(t *testing.T) {
}
func TestCancelWaybill(t *testing.T) {
err := a.ShopOrderDispatcher(63177531, "6923279680758617958", DispatcherFeeTypeCancel)
err := a.ShopOrderDispatcher(63177531, "6923264458791523778", DispatcherFeeTypeCancel)
fmt.Println(err)
}
func TestGetShipmentInfo(t *testing.T) {
data, err := a.GetShipmentInfo(6923279680758617958, 0, ShipmentTypeInvoice)
data, err := a.GetShipmentInfo(6923304804114109976, 0, ShipmentTypeInvoice)
globals.SugarLogger.Debugf("======data := %s", utils.Format4Output(data, false))
globals.SugarLogger.Debugf("======data := %s", utils.Format4Output(err, false))
}