1
This commit is contained in:
@@ -2,9 +2,7 @@ package fnpsapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
)
|
||||
@@ -125,16 +123,15 @@ func (a *API) GetChainstoreStatusNotify(request *http.Request) (shopStatusMsg *C
|
||||
return nil, callbackResponse
|
||||
}
|
||||
|
||||
storeNotify := make(map[string]interface{}, 4)
|
||||
storeNotify := &ShortStatus{}
|
||||
if err := json.Unmarshal(data, &storeNotify); err != nil {
|
||||
baseapi.SugarLogger.Debugf("FN GetChainstoreStatusNotify failed with err:%v", err)
|
||||
callbackResponse = &CallbackResponse{Code: -1}
|
||||
return nil, callbackResponse
|
||||
}
|
||||
fmt.Println("回调数据=============================", storeNotify["business_data"])
|
||||
|
||||
fnNotify := &ChainstoreStatusNotify{}
|
||||
if err := json.Unmarshal([]byte(utils.Interface2String(storeNotify["business_data"])), fnNotify); err != nil {
|
||||
if err := json.Unmarshal([]byte(storeNotify.BusinessData), fnNotify); err != nil {
|
||||
baseapi.SugarLogger.Debugf("FN callback string to GetChainstoreStatusNotify failed with err:%v", err)
|
||||
callbackResponse = &CallbackResponse{Code: -1}
|
||||
return nil, callbackResponse
|
||||
@@ -152,8 +149,6 @@ func (a *API) GetChainOrderStatusNotify(request *http.Request) (shopStatusMsg *O
|
||||
return nil, callbackResponse
|
||||
}
|
||||
|
||||
//if true { // 第二次平台分配骑手
|
||||
fmt.Println("==============", string(data))
|
||||
result := &ShortStatus{}
|
||||
if err := json.Unmarshal(data, &result); err != nil {
|
||||
callbackResponse = &CallbackResponse{Code: -1}
|
||||
@@ -165,9 +160,6 @@ func (a *API) GetChainOrderStatusNotify(request *http.Request) (shopStatusMsg *O
|
||||
callbackResponse = &CallbackResponse{Code: -1}
|
||||
return nil, callbackResponse
|
||||
}
|
||||
fmt.Println("==============orderResult", orderResult)
|
||||
fmt.Println("==============orderResult", orderResult.Param)
|
||||
fmt.Println("==============orderResult", orderResult.Param.PartnerOrderCode)
|
||||
return orderResult, SuccessResponse
|
||||
}
|
||||
|
||||
@@ -180,15 +172,15 @@ func (a *API) GetChainAbnormaltatusNotify(request *http.Request) (shopStatusMsg
|
||||
return nil, callbackResponse
|
||||
}
|
||||
|
||||
storeNotify := make(map[string]interface{}, 4)
|
||||
storeNotify := &ShortStatus{}
|
||||
if err := json.Unmarshal(data, &storeNotify); err != nil {
|
||||
baseapi.SugarLogger.Debugf("FN GetShopStatusCallbackMsg failed with err:%v", err)
|
||||
callbackResponse = &CallbackResponse{Code: -1}
|
||||
return nil, callbackResponse
|
||||
}
|
||||
fmt.Println("======================", storeNotify)
|
||||
|
||||
fnNotify := &AbnormalStatusNotify{}
|
||||
if err := json.Unmarshal([]byte(utils.Interface2String(storeNotify["business_data"])), fnNotify); err != nil {
|
||||
if err := json.Unmarshal([]byte(storeNotify.BusinessData), fnNotify); err != nil {
|
||||
baseapi.SugarLogger.Debugf("FN callback string to ChainstoreStatusNotify failed with err:%v", err)
|
||||
callbackResponse = &CallbackResponse{Code: -1}
|
||||
return nil, callbackResponse
|
||||
|
||||
Reference in New Issue
Block a user