1\
This commit is contained in:
@@ -115,26 +115,26 @@ type AbnormalReportNotify struct {
|
||||
}
|
||||
|
||||
// 获取门店状态回调消息
|
||||
func (a *API) GetChainstoreStatusNotify(request *http.Request) (shopStatusMsg *ChainstoreStatusNotify, callbackResponse *CallbackResponse) {
|
||||
func (a *API) GetChainstoreStatusNotify(request *http.Request) (shopStatusMsg *ChainstoreStatusNotify, storeNotify *ShortStatus, callbackResponse *CallbackResponse) {
|
||||
data, err := ioutil.ReadAll(request.Body)
|
||||
if err != nil {
|
||||
callbackResponse = &CallbackResponse{Code: -1}
|
||||
return nil, callbackResponse
|
||||
return nil, nil, callbackResponse
|
||||
}
|
||||
|
||||
storeNotify := &ShortStatus{}
|
||||
storeNotify = &ShortStatus{}
|
||||
if err := json.Unmarshal(data, &storeNotify); err != nil {
|
||||
callbackResponse = &CallbackResponse{Code: -1}
|
||||
return nil, callbackResponse
|
||||
return nil, nil, callbackResponse
|
||||
}
|
||||
|
||||
fnNotify := &ChainstoreStatusNotify{}
|
||||
if err := json.Unmarshal([]byte(storeNotify.BusinessData), fnNotify); err != nil {
|
||||
callbackResponse = &CallbackResponse{Code: -1}
|
||||
return nil, callbackResponse
|
||||
return nil, nil, callbackResponse
|
||||
}
|
||||
|
||||
return fnNotify, SuccessResponse
|
||||
return fnNotify, storeNotify, SuccessResponse
|
||||
}
|
||||
|
||||
// 获取订单状态回调消息
|
||||
@@ -159,26 +159,26 @@ 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, storeNotify *ShortStatus, callbackResponse *CallbackResponse) {
|
||||
data, err := ioutil.ReadAll(request.Body)
|
||||
if err != nil {
|
||||
callbackResponse = &CallbackResponse{Code: -1}
|
||||
return nil, callbackResponse
|
||||
return nil, nil, callbackResponse
|
||||
}
|
||||
|
||||
storeNotify := &ShortStatus{}
|
||||
storeNotify = &ShortStatus{}
|
||||
if err := json.Unmarshal(data, &storeNotify); err != nil {
|
||||
callbackResponse = &CallbackResponse{Code: -1}
|
||||
return nil, callbackResponse
|
||||
return nil, nil, callbackResponse
|
||||
}
|
||||
|
||||
fnNotify := &AbnormalStatusNotify{}
|
||||
if err := json.Unmarshal([]byte(storeNotify.BusinessData), fnNotify); err != nil {
|
||||
callbackResponse = &CallbackResponse{Code: -1}
|
||||
return nil, callbackResponse
|
||||
return nil, nil, callbackResponse
|
||||
}
|
||||
|
||||
return fnNotify, SuccessResponse
|
||||
return fnNotify, storeNotify, SuccessResponse
|
||||
}
|
||||
|
||||
func (a *API) CheckCallbackValidation(request *http.Request) (callbackResponse *CallbackResponse) {
|
||||
|
||||
Reference in New Issue
Block a user