1
This commit is contained in:
@@ -39,7 +39,8 @@ func (a *API) GetDispatcherInfo(storeID int64, shopOrderID string, dispatcherFee
|
|||||||
|
|
||||||
// ShopOrderDispatcher 取消运力,运力接口改版,取消和重新呼叫分开
|
// ShopOrderDispatcher 取消运力,运力接口改版,取消和重新呼叫分开
|
||||||
func (a *API) ShopOrderDispatcher(storeID int64, shopOrderID string, dispatcherType int32) error {
|
func (a *API) ShopOrderDispatcher(storeID int64, shopOrderID string, dispatcherType int32) error {
|
||||||
if dispatcherType == DispatcherFeeTypeCancel { // 取消运力
|
switch dispatcherType {
|
||||||
|
case DispatcherFeeTypeCancel:
|
||||||
request := instantShopping_cancelDelivery_request.New()
|
request := instantShopping_cancelDelivery_request.New()
|
||||||
request.Param = &instantShopping_cancelDelivery_request.InstantShoppingCancelDeliveryParam{
|
request.Param = &instantShopping_cancelDelivery_request.InstantShoppingCancelDeliveryParam{
|
||||||
ShopOrderId: shopOrderID,
|
ShopOrderId: shopOrderID,
|
||||||
@@ -54,7 +55,7 @@ func (a *API) ShopOrderDispatcher(storeID int64, shopOrderID string, dispatcherT
|
|||||||
return errors.New(response.SubMsg + ":" + response.LogId)
|
return errors.New(response.SubMsg + ":" + response.LogId)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
} else if dispatcherType == DispatcherFeeTypeCall { // 呼叫运力
|
case DispatcherFeeTypeCall:
|
||||||
request := instantShopping_createDelivery_request.New()
|
request := instantShopping_createDelivery_request.New()
|
||||||
request.Param = &instantShopping_createDelivery_request.InstantShoppingCreateDeliveryParam{
|
request.Param = &instantShopping_createDelivery_request.InstantShoppingCreateDeliveryParam{
|
||||||
ShopOrderId: shopOrderID,
|
ShopOrderId: shopOrderID,
|
||||||
|
|||||||
@@ -16,12 +16,12 @@ func TestGetDispatcherInfo(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestCancelWaybill(t *testing.T) {
|
func TestCancelWaybill(t *testing.T) {
|
||||||
err := a.ShopOrderDispatcher(63177531, "6923279680758617958", DispatcherFeeTypeCancel)
|
err := a.ShopOrderDispatcher(63177531, "6923264458791523778", DispatcherFeeTypeCancel)
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetShipmentInfo(t *testing.T) {
|
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(data, false))
|
||||||
globals.SugarLogger.Debugf("======data := %s", utils.Format4Output(err, false))
|
globals.SugarLogger.Debugf("======data := %s", utils.Format4Output(err, false))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user