增加验证码不能为空的判断

This commit is contained in:
jishenghua 2024-06-03 00:29:39 +08:00
parent 01e3b27e94
commit b7a3ec35b8
2 changed files with 5 additions and 1 deletions

View File

@ -76,6 +76,9 @@ public class ExceptionConstants {
//验证码已失效
public static final int USER_JCAPTCHA_EXPIRE_CODE = 500011;
public static final String USER_JCAPTCHA_EXPIRE_MSG = "验证码已失效";
//验证码不能为空
public static final int USER_JCAPTCHA_EMPTY_CODE = 500012;
public static final String USER_JCAPTCHA_EMPTY_MSG = "验证码不能为空,建议下载最新版本";
/**
* 角色信息

View File

@ -307,7 +307,8 @@ public class UserService {
throw new BusinessRunTimeException(ExceptionConstants.USER_JCAPTCHA_ERROR_CODE, ExceptionConstants.USER_JCAPTCHA_ERROR_MSG);
}
} else {
//TODO 在此处判断下验证码不能为空
logger.error("异常码[{}],异常提示[{}]", ExceptionConstants.USER_JCAPTCHA_EMPTY_CODE, ExceptionConstants.USER_JCAPTCHA_EMPTY_MSG);
throw new BusinessRunTimeException(ExceptionConstants.USER_JCAPTCHA_EMPTY_CODE, ExceptionConstants.USER_JCAPTCHA_EMPTY_MSG);
}
}