XiaoRuby
2023-08-26 15e31c6e6550f9e8bf6fb1df5ca5ad4cc726b64f
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
package com.yuanchu.limslaboratory.service.impl;
 
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yuanchu.limslaboratory.pojo.Role;
import com.yuanchu.limslaboratory.mapper.RoleMapper;
import com.yuanchu.limslaboratory.service.RoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
 
/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 江苏鵷雏网络科技有限公司
 * @since 2023-07-07
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {
 
    @Resource
    private RoleMapper roleMapper;
 
    @Override
    public List<Map<String, Object>> getUserRoleList() {
        LambdaQueryWrapper<Role> wrapper = new LambdaQueryWrapper<>();
        wrapper.select(Role::getId, Role::getName);
        return roleMapper.selectMaps(wrapper);
    }
}