Merge branch 'master' of e.coding.net:rosydev/baseapi

This commit is contained in:
邹宗楠
2022-12-26 17:15:02 +08:00
5 changed files with 15 additions and 15 deletions

View File

@@ -45,7 +45,7 @@ func (c *SupermGetDispatcherInfoRequest) GetParams() *SupermGetDispatcherInfoPar
}
type SupermGetDispatcherInfoParam struct {
StoreID int64 `json:"storeID"`
ShopOrderID int64 `json:"shopOrderID"`
DispatcherType int32 `json:"dispatcherType"`
StoreID int64 `json:"store_id"`
ShopOrderID string `json:"shop_order_id"`
DispatcherFeeType int32 `json:"dispatcher_fee_type"`
}

View File

@@ -8,5 +8,5 @@ type SupermGetDispatcherInfoResponse struct {
}
type SupermGetDispatcherInfoData struct {
DispatcherFee int64 `json:"dispatcherFee"` //呼叫运力费用,单位 分
DispatcherFee int64 `json:"dispatcher_fee"` //呼叫运力费用,单位 分
}

View File

@@ -12,7 +12,7 @@ type SupermOrderDispatcherRequest struct {
}
func (c *SupermOrderDispatcherRequest) GetUrlPath() string {
return "/superm/orderDispatcher"
return "/superm/shopOrderDispatcher"
}
func New() *SupermOrderDispatcherRequest {
@@ -45,7 +45,7 @@ func (c *SupermOrderDispatcherRequest) GetParams() *SupermOrderDispatcherParam {
}
type SupermOrderDispatcherParam struct {
StoreID int64 `json:"storeID"`
ShopOrderID int64 `json:"shopOrderID"`
DispatcherType int32 `json:"dispatcherType"`
StoreID int64 `json:"store_id"`
ShopOrderID string `json:"shop_order_id"`
DispatcherType int32 `json:"dispatcher_type"`
}

View File

@@ -16,12 +16,12 @@ import (
)
// /superm/getDispatcherInfo 运力呼叫询价/运力取消询价(正向)
func (a *API) GetDispatcherInfo(storeID, shopOrderID int64, dispatcherType int32) (int64, error) {
func (a *API) GetDispatcherInfo(storeID int64, shopOrderID string, dispatcherFeeType int32) (int64, error) {
request := superm_getDispatcherInfo_request.New()
request.Param = &superm_getDispatcherInfo_request.SupermGetDispatcherInfoParam{
StoreID: storeID,
ShopOrderID: shopOrderID,
DispatcherType: dispatcherType,
StoreID: storeID,
ShopOrderID: shopOrderID,
DispatcherFeeType: dispatcherFeeType,
}
response, err := request.Execute(a.accessTokenObj)
globals.SugarLogger.Debugf("运力呼叫询价/运力取消询价(正向)=========:%s", request.GetUrlPath())
@@ -36,8 +36,8 @@ func (a *API) GetDispatcherInfo(storeID, shopOrderID int64, dispatcherType int32
return response.Data.DispatcherFee, nil
}
// /superm/orderDispatcher 呼叫运力并发货/重新发货、取消运力
func (a *API) OrderDispatcher(storeID, shopOrderID int64, dispatcherType int32) error {
// /superm/shopOrderDispatcher 呼叫运力并发货/重新发货、取消运力
func (a *API) ShopOrderDispatcher(storeID int64, shopOrderID string, dispatcherType int32) error {
request := superm_orderDispatcher_request.New()
request.Param = &superm_orderDispatcher_request.SupermOrderDispatcherParam{
StoreID: storeID,

View File

@@ -7,7 +7,7 @@ import (
//运力呼叫询价(正向)
func TestGetDispatcherInfo(t *testing.T) {
dispatcherFee, err := a.GetDispatcherInfo(5015175317880528282, 5015175317880528282, 1)
dispatcherFee, err := a.GetDispatcherInfo(62490423, "5016270839501385439", 1)
fmt.Println(dispatcherFee)
fmt.Println(err)
}