改body读取数据
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"git.rosy.net.cn/baseapi"
|
"git.rosy.net.cn/baseapi"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -136,9 +137,8 @@ func (a *API) GetChainstoreStatusNotify(request *http.Request) (shopStatusMsg *C
|
|||||||
|
|
||||||
// 获取订单状态回调消息
|
// 获取订单状态回调消息
|
||||||
func (a *API) GetChainOrderStatusNotify(request *http.Request) (shopStatusMsg *OrderStatusNottify, callbackResponse *CallbackResponse) {
|
func (a *API) GetChainOrderStatusNotify(request *http.Request) (shopStatusMsg *OrderStatusNottify, callbackResponse *CallbackResponse) {
|
||||||
var data []byte
|
data, err := ioutil.ReadAll(request.Body)
|
||||||
_, err := request.Body.Read(data)
|
if err != nil {
|
||||||
if err != nil || len(data) <= 0 {
|
|
||||||
baseapi.SugarLogger.Debugf("FN GetChainOrderStatusNotify failed with No result msg err:%v", err)
|
baseapi.SugarLogger.Debugf("FN GetChainOrderStatusNotify failed with No result msg err:%v", err)
|
||||||
callbackResponse = &CallbackResponse{Code: -1}
|
callbackResponse = &CallbackResponse{Code: -1}
|
||||||
return nil, callbackResponse
|
return nil, callbackResponse
|
||||||
|
|||||||
Reference in New Issue
Block a user