zlm ResponseStatus 当状态码未定义时返回未知异常
防老六
This commit is contained in:
parent
61c989afaf
commit
bbe513d72d
@ -9,6 +9,7 @@ import lombok.Getter;
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ResponseStatus {
|
||||
Unknown(-999, "未知异常"),
|
||||
Exception(-400,"代码抛异常"),
|
||||
InvalidArgs(-300, "参数不合法"),
|
||||
SqlFailed(-200, "sql执行失败"),
|
||||
@ -27,6 +28,6 @@ public enum ResponseStatus {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return Unknown;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user