|
|
@ -248,7 +248,7 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
if (!userInfoResult.success()) { |
|
|
|
return new Result().error(userInfoResult.getMsg()); |
|
|
|
} |
|
|
|
return this.getTokenByUserDto(userInfoResult.getData(),""); |
|
|
|
return this.getTokenByUserDto(userInfoResult.getData(),null); |
|
|
|
} |
|
|
|
|
|
|
|
private Result<EpdcAppAuthorizationDTO> getNPMTokenByOpenId(WxMaJscode2SessionResult wxMaJscode2SessionResult, EpdcAppUserTokenFormDTO loginDto) { |
|
|
@ -260,7 +260,7 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
if (!userInfoResult.success()) { |
|
|
|
return new Result().error(userInfoResult.getMsg()); |
|
|
|
} |
|
|
|
return this.getTokenByUserDto(userInfoResult.getData(), loginDto.getPassword()); |
|
|
|
return this.getTokenByUserDto(userInfoResult.getData(), loginDto); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -272,7 +272,7 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
* @author work@yujt.net.cn |
|
|
|
* @date 2019/9/19 19:17 |
|
|
|
*/ |
|
|
|
private Result<EpdcAppAuthorizationDTO> getTokenByUserDto(CachingUserInfoDTO userDto, String logPwd) { |
|
|
|
private Result<EpdcAppAuthorizationDTO> getTokenByUserDto(CachingUserInfoDTO userDto, EpdcAppUserTokenFormDTO loginDto) { |
|
|
|
|
|
|
|
EpdcAppAuthorizationDTO authorization = new EpdcAppAuthorizationDTO(); |
|
|
|
// 用户未注册
|
|
|
@ -280,8 +280,11 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
authorization.setUserState(AppUserStatesEnum.STATE_NOT_REGISTERED.value()); |
|
|
|
return new Result().ok(authorization); |
|
|
|
} |
|
|
|
if (StringUtils.isNotEmpty(logPwd)) { |
|
|
|
if (!PasswordUtils.matches(logPwd, userDto.getPassWord())) { |
|
|
|
if(StringUtils.isEmpty(loginDto.getMobile()) || !userDto.getMobile().equals(loginDto.getMobile())){ |
|
|
|
return new Result<EpdcAppAuthorizationDTO>().error(-1, "请确认账号或密码是否正确!"); |
|
|
|
} |
|
|
|
if (StringUtils.isNotEmpty(loginDto.getPassword())) { |
|
|
|
if (!PasswordUtils.matches(loginDto.getPassword(), userDto.getPassWord())) { |
|
|
|
return new Result<EpdcAppAuthorizationDTO>().error(-1, "请确认账号或密码是否正确!"); |
|
|
|
} |
|
|
|
} |
|
|
|