package com.tanpu.feo.feojob.service;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tanpu.feo.feojob.constant.BaseConstant;
import com.tanpu.feo.feojob.dao.user.entity.RoleEntity;
import com.tanpu.feo.feojob.dao.user.mapper.RoleMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 角色信息表ServiceImp
*
* @author zejia zj wu 2021年05月19日
* @version 1.0
*/
@Service("roleService")
@Slf4j
public class RoleService extends ServiceImpl<RoleMapper, RoleEntity> {
@Autowired
private RoleMapper roleMapper;
public Map<String, String> findInfoNoAdmin() {
List<RoleEntity> roleEntityList = roleMapper.selectList(Wrappers.lambdaQuery(RoleEntity.class).eq(RoleEntity::getDeleteTag, BaseConstant.DeleteTagStr.NOT_DELETED));
Map<String, String> roleMap = roleEntityList.stream().collect(Collectors.toMap(RoleEntity::getType, RoleEntity::getRoleId));
return roleMap;
}
}
-
钱坤 authored7b6c9bb2