增加验证码不能为空的判断
This commit is contained in:
@@ -76,6 +76,9 @@ public class ExceptionConstants {
|
|||||||
//验证码已失效
|
//验证码已失效
|
||||||
public static final int USER_JCAPTCHA_EXPIRE_CODE = 500011;
|
public static final int USER_JCAPTCHA_EXPIRE_CODE = 500011;
|
||||||
public static final String USER_JCAPTCHA_EXPIRE_MSG = "验证码已失效";
|
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 = "验证码不能为空,建议下载最新版本";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色信息
|
* 角色信息
|
||||||
|
|||||||
@@ -307,7 +307,8 @@ public class UserService {
|
|||||||
throw new BusinessRunTimeException(ExceptionConstants.USER_JCAPTCHA_ERROR_CODE, ExceptionConstants.USER_JCAPTCHA_ERROR_MSG);
|
throw new BusinessRunTimeException(ExceptionConstants.USER_JCAPTCHA_ERROR_CODE, ExceptionConstants.USER_JCAPTCHA_ERROR_MSG);
|
||||||
}
|
}
|
||||||
} else {
|
} 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user