zlm ResponseStatus 当状态码未定义时返回未知异常

防老六
This commit is contained in:
shikong 2023-10-02 21:49:04 +08:00
parent 61c989afaf
commit bbe513d72d

View File

@ -9,6 +9,7 @@ import lombok.Getter;
@Getter @Getter
@AllArgsConstructor @AllArgsConstructor
public enum ResponseStatus { public enum ResponseStatus {
Unknown(-999, "未知异常"),
Exception(-400,"代码抛异常"), Exception(-400,"代码抛异常"),
InvalidArgs(-300, "参数不合法"), InvalidArgs(-300, "参数不合法"),
SqlFailed(-200, "sql执行失败"), SqlFailed(-200, "sql执行失败"),
@ -27,6 +28,6 @@ public enum ResponseStatus {
return status; return status;
} }
} }
return null; return Unknown;
} }
} }