package cn.wisenergy.mapper;

import cn.wisenergy.model.app.WorkUser;
import cn.wisenergy.model.app.WorkUserRole;
import cn.wisenergy.model.dto.UserRoleLevelDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface WorkUserRoleMapper extends BaseMapper<WorkUserRole> {

    List<Integer> getRole(Integer userId);

    int deleteByUserId(Integer userId);

    int insertBatch(@Param("userId") Integer userId,@Param("roleIds") List<Integer> roleIds);

    List<UserRoleLevelDto> getRoleUserLevel(Integer userId);

    List<WorkUser> getUserRoleDeptDtoByRoleId(Integer role);
}
