|
@@ -200,7 +200,7 @@ public class SysUserController extends BaseController
|
|
|
}
|
|
|
|
|
|
SysUser sysUser = userService.selectUserByUserName(username);
|
|
|
- // 短信验证码登陆 或者 验证码注册 或扫码
|
|
|
+ // 短信验证码登录 或者 验证码注册 或扫码
|
|
|
if ("1".equals(type) || "2".equals(type)) {
|
|
|
//当前时间
|
|
|
Date nowDate = DateUtils.getNowDate();
|
|
@@ -223,8 +223,8 @@ public class SysUserController extends BaseController
|
|
|
int compareTo = endDate.compareTo(dateTime);
|
|
|
if (compareTo == 0 && UserStatus.DELETED.getCode().equals(sysUser.getStatus())) {
|
|
|
if ("1".equals(type)) {
|
|
|
- remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "对不起,您的账号已冻结,请于" + nomalDates + "尝试登陆", sysUser.getCompanyId());
|
|
|
- return R.fail("对不起,您的账号:" + username + " 已冻结,请于" + nomalDates + "尝试登陆");
|
|
|
+ remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "对不起,您的账号已冻结,请于" + nomalDates + "尝试登录", sysUser.getCompanyId());
|
|
|
+ return R.fail("对不起,您的账号:" + username + " 已冻结,请于" + nomalDates + "尝试登录");
|
|
|
} else {
|
|
|
remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "对不起,您的账号已冻结,请于" + nomalDates + "尝试扫码绑定", sysUser.getCompanyId());
|
|
|
return R.fail("对不起,您的账号:" + username + " 已冻结,请于" + nomalDates + "尝试扫码绑定");
|
|
@@ -320,7 +320,7 @@ public class SysUserController extends BaseController
|
|
|
return R.ok(resMap);*/
|
|
|
}
|
|
|
|
|
|
- // 密码登陆
|
|
|
+ // 密码登录
|
|
|
} else {
|
|
|
if (StringUtils.isNull(sysUser))
|
|
|
{
|
|
@@ -361,8 +361,8 @@ public class SysUserController extends BaseController
|
|
|
suser.setFrozen_date(DateUtils.getNowDate());
|
|
|
userService.updateUserLogin(suser);
|
|
|
}else if (compareTo == 0 && UserStatus.DELETED.getCode().equals(sysUser.getStatus())) {
|
|
|
- remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "对不起,您的账号已冻结,请于"+ nomalDates +"尝试登陆",sysUser.getCompanyId());
|
|
|
- return R.fail("对不起,您的账号:" + username + " 已冻结,请于"+ nomalDates +"尝试登陆");
|
|
|
+ remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "对不起,您的账号已冻结,请于"+ nomalDates +"尝试登录",sysUser.getCompanyId());
|
|
|
+ return R.fail("对不起,您的账号:" + username + " 已冻结,请于"+ nomalDates +"尝试登录");
|
|
|
}
|
|
|
}
|
|
|
//登录错误到达五次就转为冻结
|
|
@@ -383,8 +383,8 @@ public class SysUserController extends BaseController
|
|
|
Date nomalDate = c.getTime();
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
nomalDates = sdf.format(nomalDate);
|
|
|
- remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "对不起,您的账号已冻结,请于"+ nomalDates +"尝试登陆",sysUser.getCompanyId());
|
|
|
- return R.fail("对不起,您的账号:" + username + " 已冻结,请于"+ nomalDates +"尝试登陆");
|
|
|
+ remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "对不起,您的账号已冻结,请于"+ nomalDates +"尝试登录",sysUser.getCompanyId());
|
|
|
+ return R.fail("对不起,您的账号:" + username + " 已冻结,请于"+ nomalDates +"尝试登录");
|
|
|
}
|
|
|
if (StringUtils.isAnyBlank(username, password))
|
|
|
{
|
|
@@ -440,7 +440,7 @@ public class SysUserController extends BaseController
|
|
|
remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "密码或账号错误,请重新输入,当日还有"+ surplus +"次试错机会!!",sysUser.getCompanyId());
|
|
|
return R.fail("密码或账号错误,请重新输入,当日还有"+ surplus +"次试错机会!!!");
|
|
|
}
|
|
|
- // 账号 + 密码登陆
|
|
|
+ // 账号 + 密码登录
|
|
|
if ("0".equals(type) && !SecurityUtils.matchesPassword(password, sysUser.getPassword()))
|
|
|
{
|
|
|
//错误次数加一次
|
|
@@ -548,7 +548,7 @@ public class SysUserController extends BaseController
|
|
|
{
|
|
|
String companyId = param.get("companyId");
|
|
|
if (StringUtils.isEmpty(companyId)) {
|
|
|
- return R.fail("请选择登陆企业!");
|
|
|
+ return R.fail("请选择登录企业!");
|
|
|
}
|
|
|
LoginUser loginUser = tokenService.getLoginUser();
|
|
|
LambdaQueryWrapper<SysUserCompanyRel> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|