- 修正各平台与拉取订单相关的API的bug

This commit is contained in:
gazebo
2019-07-18 18:35:59 +08:00
parent e29e30604e
commit 061e906d17
8 changed files with 210 additions and 23 deletions

View File

@@ -45,6 +45,7 @@ const (
ErrCodeAccessLimited = 711 // 接口调用过于频繁,触发流控,请降低调用频率
ErrCodeNoAppFood = 805 // 不存在此菜品
ErrCodeNoSuchOrder = 808 // 不存在此订单
ErrCodeSkuCategoryNotExist = 1021 // 菜品分类不存在
ErrCodeSkuCategoryExist = 1037 // 菜品分类已存在
)
@@ -159,6 +160,7 @@ func (a *API) AccessAPI2(cmd string, isGet bool, bizParams map[string]interface{
if jsonResult1 == nil {
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
}
retVal = jsonResult1[resultKey]
if errObj, ok := jsonResult1["error"]; ok {
baseapi.SugarLogger.Debugf("mtwm AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true))
errorInfo := errObj.(map[string]interface{})
@@ -168,7 +170,6 @@ func (a *API) AccessAPI2(cmd string, isGet bool, bizParams map[string]interface{
}
return platformapi.ErrLevelCodeIsNotOK, newErr
}
retVal = jsonResult1[resultKey]
return platformapi.ErrLevelSuccess, nil
})
err = platformapi.RebuildError(err, bizParams, []string{