| | |
| | | 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> |
| | |
| | | @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); |
| | | } |
| | | } |