Van333
2022-12-29 d8f66b834134f6b755fd3fb93bb91b56f9d31f6f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
 * Copyright (c) 2016-2019 人人开源 All rights reserved.
 *
 * https://www.machine.io
 *
 * 版权所有,侵权必究!
 */
 
package api.dao;
 
import api.bean.SysUserRoleEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
 
/**
 * 用户与角色对应关系
 *
 * @author Mark sunlightcs@gmail.com
 */
@Mapper
public interface SysUserRoleDao extends BaseMapper<SysUserRoleEntity> {
 
//    /**
//     * 根据用户ID,获取角色ID列表
//     */
//    List<Long> queryRoleIdList(Long userId);
 
    /**
     * 根据用户ID,获取角色ID列表
     */
    @Select("select role_id from sys_user_role where user_id = #{userId}")
    Long queryRoleId(@Param("userId")Long userId);
 
 
    /**
     * 根据角色ID数组,批量删除
     */
    int deleteBatch(Long[] roleIds);
 
}