forked from ruoyi/RuoYi-Vue
优化代码
This commit is contained in:
@@ -77,6 +77,15 @@ public interface SysUserMapper
|
||||
*/
|
||||
public int updateUserAvatar(@Param("userId") Long userId, @Param("avatar") String avatar);
|
||||
|
||||
/**
|
||||
* 修改用户状态
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param status 状态
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUserStatus(@Param("userId") Long userId, @Param("status") String status);
|
||||
|
||||
/**
|
||||
* 更新用户登录信息(IP和登录时间)
|
||||
*
|
||||
|
||||
@@ -327,7 +327,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||
@Override
|
||||
public int updateUserStatus(SysUser user)
|
||||
{
|
||||
return userMapper.updateUser(user);
|
||||
return userMapper.updateUserStatus(user.getUserId(), user.getStatus());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -377,7 +377,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||
@Override
|
||||
public int resetPwd(SysUser user)
|
||||
{
|
||||
return userMapper.updateUser(user);
|
||||
return userMapper.resetUserPwd(user.getUserId(), user.getPassword());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -531,6 +531,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||
checkUserDataScope(u.getUserId());
|
||||
deptService.checkDeptDataScope(user.getDeptId());
|
||||
user.setUserId(u.getUserId());
|
||||
user.setDeptId(u.getDeptId());
|
||||
user.setUpdateBy(operName);
|
||||
userMapper.updateUser(user);
|
||||
successNum++;
|
||||
|
||||
Reference in New Issue
Block a user