From 865497771363a0f61d684130f20bc004251a8078 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Wed, 10 Jan 2024 15:37:38 +0800 Subject: [PATCH] 1 --- business/partner/delivery/sfps/waybill.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/business/partner/delivery/sfps/waybill.go b/business/partner/delivery/sfps/waybill.go index ebe4ecfff..b074a5daf 100644 --- a/business/partner/delivery/sfps/waybill.go +++ b/business/partner/delivery/sfps/waybill.go @@ -2,6 +2,7 @@ package sfps import ( "bufio" + "encoding/json" "errors" "fmt" "io/ioutil" @@ -470,10 +471,10 @@ func pushCallbackToGy(urlIndex string, msg interface{}) { request *http.Request param = make(map[string]interface{}) ) - param = changeToRaw(urlIndex, msg) + //param = changeToRaw(urlIndex, msg) //globals.SugarLogger.Debugf("sfsfsf pushCallbackToGy param=%s", utils.Format4Output(param, false)) - //b, _ := json.Marshal(msg) + b, _ := json.Marshal(msg) //sign := api.SfPsAPI.SignParam(b) switch urlIndex { @@ -482,7 +483,7 @@ func pushCallbackToGy(urlIndex string, msg interface{}) { default: //fullUrl := utils.GenerateGetURL("http://callback-jxgy.jxc4.com/SFPS/SfOrder", "", map[string]interface{}{"sign": sign}) //request, err = http.NewRequest(http.MethodPost, fullUrl, strings.NewReader(string(b))) - request, err = http.NewRequest(http.MethodPost, "http://callback-jxgy.jxc4.com/SFPS/SfOrder", strings.NewReader(utils.Map2URLValues(param).Encode())) + request, err = http.NewRequest(http.MethodPost, "http://callback-jxgy.jxc4.com/SFPS/SfOrder", strings.NewReader(string(b))) } //检测request数据