改body读取数据

This commit is contained in:
邹宗楠
2022-03-31 17:03:57 +08:00
parent bce54cb81e
commit 4a5cfeef17

View File

@@ -5,6 +5,7 @@ import (
"fmt"
"git.rosy.net.cn/baseapi"
"git.rosy.net.cn/baseapi/utils"
"io/ioutil"
"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) {
var data []byte
_, err := request.Body.Read(data)
if err != nil || len(data) <= 0 {
data, err := ioutil.ReadAll(request.Body)
if err != nil {
baseapi.SugarLogger.Debugf("FN GetChainOrderStatusNotify failed with No result msg err:%v", err)
callbackResponse = &CallbackResponse{Code: -1}
return nil, callbackResponse