1.修改方法名称
This commit is contained in:
@@ -333,7 +333,7 @@ public class SysLoginService
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public AjaxResult getWxPhone(LoginBody dto){
|
public AjaxResult getWxPhone(LoginBody dto){
|
||||||
AjaxResult validateResult = validateBaseParam(dto);
|
AjaxResult validateResult = validSmsPhone(dto);
|
||||||
if (validateResult != null) {
|
if (validateResult != null) {
|
||||||
return validateResult;
|
return validateResult;
|
||||||
}
|
}
|
||||||
@@ -442,7 +442,7 @@ public class SysLoginService
|
|||||||
*/
|
*/
|
||||||
public AjaxResult appLoginTwo(LoginBody dto) {
|
public AjaxResult appLoginTwo(LoginBody dto) {
|
||||||
// 1. 验证基础参数(前端userType仅0/1,拦截非法参数)
|
// 1. 验证基础参数(前端userType仅0/1,拦截非法参数)
|
||||||
AjaxResult validateResult = validateBaseParam(dto);
|
AjaxResult validateResult = validateUserType(dto);
|
||||||
if (validateResult != null) {
|
if (validateResult != null) {
|
||||||
return validateResult;
|
return validateResult;
|
||||||
}
|
}
|
||||||
@@ -578,6 +578,36 @@ public class SysLoginService
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证获取手机号参数
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private AjaxResult validSmsPhone(LoginBody dto){
|
||||||
|
if (dto == null) {
|
||||||
|
return AjaxResult.error(ParamErrorConstants.PARAM_NULL_MSG);
|
||||||
|
}
|
||||||
|
if (StringUtils.isEmpty(dto.getCode())) {
|
||||||
|
return AjaxResult.error(ParamErrorConstants.CODE_EMPTY_MSG);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证角色
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private AjaxResult validateUserType(LoginBody dto){
|
||||||
|
String userType = dto.getUserType();
|
||||||
|
if (StringUtils.isEmpty(userType) ||
|
||||||
|
!StringUtil.IS_COMPANY_USER.equals(userType) &&
|
||||||
|
!StringUtil.IS_JOB_REQUEST_USER.equals(userType)) {
|
||||||
|
return AjaxResult.error(ParamErrorConstants.USER_TYPE_INVALID_MSG);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 2-微信授权信息获取(封装code2Session逻辑)
|
* 2-微信授权信息获取(封装code2Session逻辑)
|
||||||
* @param code
|
* @param code
|
||||||
|
|||||||
Reference in New Issue
Block a user