package com.xhkjedu.suser.mapper.system;

import com.xhkjedu.base.TkMapper;
import com.xhkjedu.suser.model.system.TRole;
import com.xhkjedu.suser.vo.system.RoleVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @ClassName RoleMapper
 * Description TODO
 * Author WN
 * Date 2020/6/13 17:40
 **/
@Repository
public interface RoleMapper extends TkMapper<TRole> {
    /**
     *功能描述  获取所有角色
     * @author WN
     * @date 2020/6/15
     * @param  * @param schoolid
     * @return java.util.List<com.xhkjedu.model.system.TRole>
     */
    List<TRole> listAllRoles (@Param("schoolid")Integer schoolid);

    /**
     *功能描述 获取角色详情，包含用户
     * @author WN
     * @date 2020/6/15
     * @param  * @param roleid
     * @return RoleVo
     */
    RoleVo getRoleDetail(@Param("roleid")Integer roleid);

    //根据角色id获取角色类型
    Integer getTypeById(@Param("roleid") Integer roleid);

    //角色选择列表
    List<Map> listForSel(@Param("schoolid") Integer schoolid);
}
