对接新供应链-唯品尚
This commit is contained in:
@@ -17,7 +17,7 @@ type WeiPinShangClient struct {
|
||||
Key string
|
||||
}
|
||||
|
||||
func NewWeiPinShangClient(host string, channelType, key string) *WeiPinShangClient {
|
||||
func NewWeiPinShangClient(host, channelType, key string) *WeiPinShangClient {
|
||||
return &WeiPinShangClient{
|
||||
Host: host,
|
||||
ChannelType: channelType,
|
||||
@@ -25,7 +25,7 @@ func NewWeiPinShangClient(host string, channelType, key string) *WeiPinShangClie
|
||||
}
|
||||
}
|
||||
|
||||
func (w *WeiPinShangClient) GetOrderInfo(orderNo string) (res any, err error) {
|
||||
func (w *WeiPinShangClient) GetOrderInfo(orderNo string) (res *GetOrderInfoRes, err error) {
|
||||
fmt.Println("orderNo", orderNo)
|
||||
paramMap := make(map[string]any)
|
||||
paramMap["orderNo"] = orderNo
|
||||
@@ -36,14 +36,14 @@ func (w *WeiPinShangClient) GetOrderInfo(orderNo string) (res any, err error) {
|
||||
|
||||
err = json.Unmarshal(postRes, &res)
|
||||
if err != nil || res == nil {
|
||||
err = fmt.Errorf("转换结构体失败: %s", string(postRes))
|
||||
err = fmt.Errorf("转换GetOrderInfoRes结构体失败: %s", string(postRes))
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (w *WeiPinShangClient) IsRefund(mcOrderNo string) (res any, err error) {
|
||||
func (w *WeiPinShangClient) IsRefund(mcOrderNo string) (res *IsRefundRes, err error) {
|
||||
fmt.Println("mcOrderNo", mcOrderNo)
|
||||
paramMap := make(map[string]any)
|
||||
paramMap["mcOrderNo"] = mcOrderNo
|
||||
@@ -60,10 +60,24 @@ func (w *WeiPinShangClient) IsRefund(mcOrderNo string) (res any, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (w *WeiPinShangClient) CreateAfsApply(createAfsApplyReq CreateAfsApplyReq) (res any, err error) {
|
||||
func (w *WeiPinShangClient) CreateAfsApply(createAfsApplyReq CreateAfsApplyReq) (res *CreateAfsApplyRes, err error) {
|
||||
fmt.Println("createAfsApplyReq", createAfsApplyReq)
|
||||
paramMap := make(map[string]any)
|
||||
paramMap["createAfsApplyReq"] = createAfsApplyReq
|
||||
|
||||
paramMap["mcOrderNo"] = createAfsApplyReq.McOrderNo
|
||||
|
||||
paramMap["customerExpect"] = createAfsApplyReq.CustomerExpect
|
||||
paramMap["questionDesc"] = createAfsApplyReq.QuestionDesc
|
||||
paramMap["questionPic"] = createAfsApplyReq.QuestionPic
|
||||
paramMap["customerContactName"] = createAfsApplyReq.CustomerContactName
|
||||
paramMap["customerMobilePhone"] = createAfsApplyReq.CustomerMobilePhone
|
||||
paramMap["customerTel"] = createAfsApplyReq.CustomerTel
|
||||
|
||||
paramMap["pickwareProvince"] = createAfsApplyReq.PickwareProvince
|
||||
paramMap["pickwareCity"] = createAfsApplyReq.PickwareCity
|
||||
paramMap["pickwareCounty"] = createAfsApplyReq.PickwareCounty
|
||||
paramMap["pickwareAddress"] = createAfsApplyReq.PickwareAddress
|
||||
|
||||
postRes, err := w.WPSPost("/mcang/Refunds/IsRefund", paramMap)
|
||||
if err != nil {
|
||||
return
|
||||
@@ -77,7 +91,7 @@ func (w *WeiPinShangClient) CreateAfsApply(createAfsApplyReq CreateAfsApplyReq)
|
||||
return
|
||||
}
|
||||
|
||||
func (w *WeiPinShangClient) OrderCancel(mcOrderNo string) (res any, err error) {
|
||||
func (w *WeiPinShangClient) OrderCancel(mcOrderNo string) (res *OrderCancelRes, err error) {
|
||||
fmt.Println("mcOrderNo", mcOrderNo)
|
||||
paramMap := make(map[string]any)
|
||||
paramMap["mcOrderNo"] = mcOrderNo
|
||||
|
Reference in New Issue
Block a user