孙永军 před 1 rokem
rodič
revize
7e34e203a5

+ 1 - 1
src/main/java/com/smcic/core/advice/APIResponseAdvice.java

@@ -33,7 +33,7 @@ public class APIResponseAdvice implements ResponseBodyAdvice<Object> {
         apiNoDataResponse.setCode(ex.getErrorCode());
         apiNoDataResponse.setMessage(ex.getErrorMessage());
 
-        response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
+        response.setStatus(ex.getErrorCode() == -1 ? HttpStatus.INTERNAL_SERVER_ERROR.value() : HttpStatus.OK.value());
         return apiNoDataResponse;
     }