|
|
@ -4,6 +4,9 @@ import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import javax.validation.Validator;
|
|
|
|
import javax.validation.Validator;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.common.core.constant.CacheConstants;
|
|
|
|
|
|
|
|
import com.ruoyi.common.redis.service.RedisService;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@ -61,6 +64,9 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
protected Validator validator;
|
|
|
|
protected Validator validator;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private RedisService redisService;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 根据条件分页查询用户列表
|
|
|
|
* 根据条件分页查询用户列表
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -358,6 +364,9 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int resetPwd(SysUser user)
|
|
|
|
public int resetPwd(SysUser user)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
// 重置密码的时候,同步删除 登录错误次数 缓存
|
|
|
|
|
|
|
|
redisService.deleteObject(CacheConstants.REDIS_KEY_ERROR_TIMES + user.getUserName());
|
|
|
|
|
|
|
|
|
|
|
|
return userMapper.updateUser(user);
|
|
|
|
return userMapper.updateUser(user);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -371,6 +380,9 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int resetUserPwd(String userName, String password)
|
|
|
|
public int resetUserPwd(String userName, String password)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
// 重置密码的时候,同步删除 登录错误次数 缓存
|
|
|
|
|
|
|
|
redisService.deleteObject(CacheConstants.REDIS_KEY_ERROR_TIMES + userName);
|
|
|
|
|
|
|
|
|
|
|
|
return userMapper.resetUserPwd(userName, password);
|
|
|
|
return userMapper.resetUserPwd(userName, password);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|