添加工厂方法的重载。

pull/1/head
ZhouXY108 2023-02-16 15:03:41 +08:00
parent f70e9575ea
commit 02d918d0a4
1 changed files with 20 additions and 4 deletions

View File

@ -21,18 +21,34 @@ public class AccountLoginException extends PlusoneException {
} }
public static AccountLoginException accountNotExistException() { public static AccountLoginException accountNotExistException() {
return new AccountLoginException(4030101, "用户账户不存在"); return accountNotExistException("用户账户不存在");
}
public static AccountLoginException accountNotExistException(String msg) {
return new AccountLoginException(4030101, msg);
} }
public static AccountLoginException otpErrorException() { public static AccountLoginException otpErrorException() {
return new AccountLoginException(4030501, "验证码错误"); return otpErrorException("验证码错误");
}
public static AccountLoginException otpErrorException(String msg) {
return new AccountLoginException(4030501, msg);
} }
public static AccountLoginException otpNotExistsException() { public static AccountLoginException otpNotExistsException() {
return new AccountLoginException(4030502, "验证码不存在或已过期"); return otpNotExistsException("验证码不存在或已过期");
}
public static AccountLoginException otpNotExistsException(String msg) {
return new AccountLoginException(4030502, msg);
} }
public static AccountLoginException passwordErrorException() { public static AccountLoginException passwordErrorException() {
return new AccountLoginException(4030200, "用户密码错误"); return passwordErrorException("用户密码错误");
}
public static AccountLoginException passwordErrorException(String msg) {
return new AccountLoginException(4030200, msg);
} }
} }