Merge branch 'master' into get-store

This commit is contained in:
gazebo
2019-06-24 10:12:27 +08:00
67 changed files with 3112 additions and 729 deletions

View File

@@ -112,7 +112,7 @@ func (a *API) AccessAPI(cmd string, body map[string]interface{}) (retVal *Respon
return request
},
a.config,
func(jsonResult1 map[string]interface{}) (result string, err error) {
func(response *http.Response, jsonResult1 map[string]interface{}) (result string, err error) {
Body := jsonResult1["body"].(map[string]interface{})
retVal = &ResponseResult{
ErrNo: int(utils.MustInterface2Int64(Body["errno"])),
@@ -125,7 +125,7 @@ func (a *API) AccessAPI(cmd string, body map[string]interface{}) (retVal *Respon
baseapi.SugarLogger.Debugf("ebai AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true))
newErr := utils.NewErrorIntCode(retVal.Error, retVal.ErrNo)
// todo 临时处理超过阈值错...
if newErr.IntCode() == 20501 && strings.Index(retVal.Error, "阈值") >= 0 {
if (newErr.IntCode() == 20501 && strings.Index(retVal.Error, "阈值") >= 0) || (newErr.IntCode() == 20502 && strings.Index(retVal.Error, "系统繁忙") >= 0) {
return platformapi.ErrLevelExceedLimit, newErr
}
return platformapi.ErrLevelCodeIsNotOK, newErr