docs(SystemUserRoleService): 更新用户角色服务类的Java文档注释
- 为批量绑定用户角色方法添加测试通过标记注释 - 为批量解绑用户角色方法添加测试通过标记注释 - 为根据用户ID查询方法添加测试通过标记注释 - 为权限检查方法添加测试通过标记注释 - 为根据用户id列举角色方法添加完整JavaDoc注释 - 为根据用户id列举角色级别方法添加完整JavaDoc注释
This commit is contained in:
+20
-2
@@ -50,6 +50,9 @@ public class SystemUserRoleService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SystemRoleDeptService systemRoleDeptService;
|
private SystemRoleDeptService systemRoleDeptService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量绑定用户角色 -> TestPassed
|
||||||
|
*/
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void batchInsertUserRole(Set<SystemRoleTb> roles, Long userId) {
|
public void batchInsertUserRole(Set<SystemRoleTb> roles, Long userId) {
|
||||||
if (CollUtil.isNotEmpty(roles)) {
|
if (CollUtil.isNotEmpty(roles)) {
|
||||||
@@ -64,6 +67,9 @@ public class SystemUserRoleService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量解绑用户角色 -> TestPassed
|
||||||
|
*/
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void batchDeleteUserRole(Set<Long> userIds) {
|
public void batchDeleteUserRole(Set<Long> userIds) {
|
||||||
if (CollUtil.isNotEmpty(userIds)) {
|
if (CollUtil.isNotEmpty(userIds)) {
|
||||||
@@ -94,7 +100,7 @@ public class SystemUserRoleService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户ID查询
|
* 根据用户ID查询 -> TestPassed
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return /
|
* @return /
|
||||||
@@ -129,7 +135,7 @@ public class SystemUserRoleService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 如果当前用户的角色级别低于创建用户的角色级别,则抛出权限不足的错误
|
* 如果当前用户的角色级别低于创建用户的角色级别,则抛出权限不足的错误 -> TestPassed
|
||||||
*
|
*
|
||||||
* @param args /
|
* @param args /
|
||||||
*/
|
*/
|
||||||
@@ -151,10 +157,22 @@ public class SystemUserRoleService {
|
|||||||
return systemUserRoleMapper.selectCount(wrapper);
|
return systemUserRoleMapper.selectCount(wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户id列举角色 -> TestPassed
|
||||||
|
*
|
||||||
|
* @param userId /
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
public Set<SystemRoleTb> listUserRoleByUserId(Long userId) {
|
public Set<SystemRoleTb> listUserRoleByUserId(Long userId) {
|
||||||
return systemUserRoleMapper.listUserRoleByUserId(userId);
|
return systemUserRoleMapper.listUserRoleByUserId(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户id列举角色级别 -> TestPassed
|
||||||
|
*
|
||||||
|
* @param userId /
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
public List<Integer> listUserRoleLevelByUserId(Long userId) {
|
public List<Integer> listUserRoleLevelByUserId(Long userId) {
|
||||||
return systemUserRoleMapper.listUserRoleLevelByUserId(userId);
|
return systemUserRoleMapper.listUserRoleLevelByUserId(userId);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user