SYYTe/maku-boot-system/src/main/java/net/maku/system/service/SysUserRoleService.java
2023-02-21 16:44:04 +08:00

54 lines
1.3 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package net.maku.system.service;
import net.maku.framework.mybatis.service.BaseService;
import net.maku.system.entity.SysUserRoleEntity;
import java.util.List;
/**
* 用户角色关系
*
* @author 阿沐 babamu@126.com
* <a href="https://maku.net">MAKU</a>
*/
public interface SysUserRoleService extends BaseService<SysUserRoleEntity> {
/**
* 保存或修改
* @param userId 用户ID
* @param roleIdList 角色ID列表
*/
void saveOrUpdate(Long userId, List<Long> roleIdList);
/**
* 分配角色给用户列表
* @param roleId 角色ID
* @param userIdList 用户ID列表
*/
void saveUserList(Long roleId, List<Long> userIdList);
/**
* 根据角色id列表删除用户角色关系
* @param roleIdList 角色id
*/
void deleteByRoleIdList(List<Long> roleIdList);
/**
* 根据用户id列表删除用户角色关系
* @param userIdList 用户id列表
*/
void deleteByUserIdList(List<Long> userIdList);
/**
* 根据角色id、用户id列表删除用户角色关系
* @param roleId 角色id
* @param userIdList 用户id列表
*/
void deleteByUserIdList(Long roleId, List<Long> userIdList);
/**
* 角色ID列表
* @param userId 用户ID
*/
List<Long> getRoleIdList(Long userId);
}