1
This commit is contained in:
@@ -123,8 +123,8 @@ func (a *API) GetChainstoreStatusNotify(request *http.Request) (shopStatusMsg *C
|
|||||||
}
|
}
|
||||||
|
|
||||||
storeNotify := make(map[string]interface{}, 4)
|
storeNotify := make(map[string]interface{}, 4)
|
||||||
if err := utils.Map2StructByJson(data, storeNotify, true); err != nil {
|
if err := json.Unmarshal(data, storeNotify); err != nil {
|
||||||
baseapi.SugarLogger.Debugf("FN GetShopStatusCallbackMsg failed with err:%v", err)
|
baseapi.SugarLogger.Debugf("FN GetChainstoreStatusNotify failed with err:%v", err)
|
||||||
callbackResponse = &CallbackResponse{Code: -1}
|
callbackResponse = &CallbackResponse{Code: -1}
|
||||||
return nil, callbackResponse
|
return nil, callbackResponse
|
||||||
}
|
}
|
||||||
@@ -170,16 +170,22 @@ func (a *API) GetChainOrderStatusNotify(request *http.Request) (shopStatusMsg *O
|
|||||||
|
|
||||||
// 异常配送
|
// 异常配送
|
||||||
func (a *API) GetChainAbnormaltatusNotify(request *http.Request) (shopStatusMsg *AbnormalStatusNotify, callbackResponse *CallbackResponse) {
|
func (a *API) GetChainAbnormaltatusNotify(request *http.Request) (shopStatusMsg *AbnormalStatusNotify, callbackResponse *CallbackResponse) {
|
||||||
storeNotify := ShortStatus{}
|
data, err := ioutil.ReadAll(request.Body)
|
||||||
err := utils.Map2StructByJson(utils.URLValues2Map(request.PostForm), &storeNotify, true)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
baseapi.SugarLogger.Debugf("FN GetChainOrderStatusNotify failed with No result msg err:%v", err)
|
||||||
|
callbackResponse = &CallbackResponse{Code: -1}
|
||||||
|
return nil, callbackResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
storeNotify := make(map[string]interface{}, 4)
|
||||||
|
if err := json.Unmarshal(data, storeNotify); err != nil {
|
||||||
baseapi.SugarLogger.Debugf("FN GetShopStatusCallbackMsg failed with err:%v", err)
|
baseapi.SugarLogger.Debugf("FN GetShopStatusCallbackMsg failed with err:%v", err)
|
||||||
callbackResponse = &CallbackResponse{Code: -1}
|
callbackResponse = &CallbackResponse{Code: -1}
|
||||||
return nil, callbackResponse
|
return nil, callbackResponse
|
||||||
}
|
}
|
||||||
fmt.Println("======================", storeNotify)
|
fmt.Println("======================", storeNotify)
|
||||||
fnNotify := &AbnormalStatusNotify{}
|
fnNotify := &AbnormalStatusNotify{}
|
||||||
if err := json.Unmarshal([]byte(utils.Interface2String(storeNotify.BusinessData)), fnNotify); err != nil {
|
if err := json.Unmarshal([]byte(utils.Interface2String(storeNotify["business_data"])), fnNotify); err != nil {
|
||||||
baseapi.SugarLogger.Debugf("FN callback string to ChainstoreStatusNotify failed with err:%v", err)
|
baseapi.SugarLogger.Debugf("FN callback string to ChainstoreStatusNotify failed with err:%v", err)
|
||||||
callbackResponse = &CallbackResponse{Code: -1}
|
callbackResponse = &CallbackResponse{Code: -1}
|
||||||
return nil, callbackResponse
|
return nil, callbackResponse
|
||||||
|
|||||||
Reference in New Issue
Block a user