package com.example.erp.service.userInfo;
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.example.erp.entity.userInfo.Role;
|
import com.example.erp.mapper.userInfo.RoleMapper;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
|
import java.util.List;
|
|
@Service
|
@DS("user_info")
|
public class RoleService {
|
private final RoleMapper roleMapper;
|
|
public RoleService(RoleMapper roleMapper) {
|
this.roleMapper = roleMapper;
|
}
|
|
public List<Role> findAll() {
|
return roleMapper.selectList(
|
new QueryWrapper<Role>()
|
.ne("role","admin")
|
);
|
}
|
}
|