改body读取数据
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user