package com.patzn.lims.sys.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.patzn.lims.sys.entity.SysUserRelRole;
import com.patzn.lims.core.web.IBaseService;

import java.util.List;

/**
 * <p>
 * 用户角色关联表 服务类
 * </p>
 *
 * @author patzn
 * @since 2017-08-03
 */
public interface ISysUserRelRoleService extends IBaseService<SysUserRelRole> {


    IPage<SysUserRelRole> page(Page<SysUserRelRole> page, SysUserRelRole sysUserRelRole);


    List<SysUserRelRole> list(SysUserRelRole sysUserRelRole);


    List<SysUserRelRole> getRelRole(Long userId);


    boolean saveRelRole(Long companyId, Long userId, Long roleIds);


    boolean saveRelRole(Long userId, List<Long> roleIds);


    Long getFirstRelRoleId(Long companyId, Long userId);
}
