package com.backendsys.modules.system.dao;

import com.backendsys.modules.system.entity.SysUserRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

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

@Mapper
public interface SysUserRoleDao extends BaseMapper<SysUserRole> {

    List<SysUserRole> selectUserRoleList(SysUserRole sysUserRole);

    // 获得用户角色 (部分字段)
    List<Map<String, Object>> selectRoleByUserId(Long user_id);

    int insertUserRole(SysUserRole sysUserRole);
    int insertUserRolePermissionRelation(SysUserRole sysUserRole);

    int updateUserRole(SysUserRole sysUserRole);
    int updateUserRolePermissionRelation(SysUserRole sysUserRole);

}
