Air
2024-11-04 2016903d06e308f44b9463fcd4029850ababf152
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
package com.nova.sankuai.infra.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nova.sankuai.domain.entity.RoleUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
 
import java.util.List;
 
 
/**
 * @author weikangdi
 */
@Component
@Mapper
public interface RoleUserMapper extends BaseMapper<RoleUser> {
    /**
     * 根据用户Id删除关联角色
     *
     * @param userId
     */
    void deleteByUserId(@Param("userId") Long userId);
 
    /**
     * 给用户分配角色
     *
     * @param list
     * @param userId
     */
    void assignRoles(@Param("list") List<Long> list, @Param("userId") Long userId);
}