mtwmapi.ParseErr4RetailDiscountDelete

This commit is contained in:
gazebo
2019-11-30 14:08:58 +08:00
parent dd1399d173
commit cf1dc1d6a2
4 changed files with 46 additions and 7 deletions

View File

@@ -165,7 +165,6 @@ 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{})
@@ -176,6 +175,10 @@ func (a *API) AccessAPI2(cmd string, isGet bool, bizParams map[string]interface{
return platformapi.ErrLevelRecoverableErr, newErr
}
return platformapi.ErrLevelCodeIsNotOK, newErr
} else if resultKey != "" {
retVal = jsonResult1[resultKey]
} else {
retVal = jsonResult1
}
return platformapi.ErrLevelSuccess, nil
})