package com.gci.boot.modules.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gci.boot.modules.system.entity.SysRole;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 角色表 服务类
 * </p>
 *
 * @author chenzhiwei
 * @since 2023-08-18
 */
public interface ISysRoleService extends IService<SysRole> {

    @Transactional(rollbackFor = Exception.class)
    boolean deleteRole(String roleid);

    @Transactional(rollbackFor = Exception.class)
    boolean deleteBatchRole(String[] roleIds);

    Set<String> getRoleCodeSetByUserId(String userId);

    /**
     * 根据userId查询角色信息
     * @param userId
     * @return
     */
    List<SysRole> getRoleByUserId(String userId);
}
