package com.gz.service.system;

import cn.hutool.core.lang.tree.Tree;
import com.github.pagehelper.PageInfo;
import com.gz.dto.system.RoleDTO;
import com.gz.vo.system.RoleMenuVO;
import com.gz.vo.system.RoleVO;

import java.util.List;

public interface RoleService {

    /**
     * @description 增
     * @author LiuChangLan
     * @since 2020/9/4 14:46
     */
    public Integer insert(RoleDTO roleDTO);

    /**
     * @description 删
     * @author LiuChangLan
     * @since 2020/9/4 14:46
     */
    public Integer delete(Integer id);

    /**
     * @description 改
     * @author LiuChangLan
     * @since 2020/9/4 14:46
     */
    public Integer update(RoleDTO roleDTO);

    /**
     * @description 查(给分页参数查分页 没给查全部)
     * @author LiuChangLan
     * @since 2020/9/4 14:46
     */
    public PageInfo<RoleDTO> select(RoleVO roleVO);

    /**
     * @description 根据主键查询
     * @author LiuChangLan
     * @since 2020/9/4 16:35
     */
    public RoleDTO selectByPrimaryKey(Integer id);

    /**
     * @description 设置权限
     * @author LiuChangLan
     * @since 2020/9/22 9:51
     */
    public Integer setRole(RoleMenuVO vo);


    public List<Tree<String>> selectRoleList(Integer roleId);

    List<RoleDTO> selectAllRole();

}
