| | |
| | | package com.ruoyi.project.system.service.impl;
|
| | |
|
| | | import java.util.List;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import com.ruoyi.common.constant.UserConstants;
|
| | | import com.ruoyi.common.exception.ServiceException;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | |
| | | import com.ruoyi.project.system.mapper.SysPostMapper;
|
| | | import com.ruoyi.project.system.mapper.SysUserPostMapper;
|
| | | import com.ruoyi.project.system.service.ISysPostService;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * 岗位信息 服务层处理
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class SysPostServiceImpl implements ISysPostService
|
| | | {
|
| | | @Autowired
|
| | | private SysPostMapper postMapper;
|
| | |
|
| | | @Autowired
|
| | | private SysUserPostMapper userPostMapper;
|
| | | private final SysPostMapper postMapper;
|
| | | private final SysUserPostMapper userPostMapper;
|
| | |
|
| | | /**
|
| | | * 查询岗位信息集合
|
| | |
| | | * @return 选中岗位ID列表
|
| | | */
|
| | | @Override
|
| | | public List<Integer> selectPostListByUserId(Long userId)
|
| | | public List<Long> selectPostListByUserId(Long userId)
|
| | | {
|
| | | return postMapper.selectPostListByUserId(userId);
|
| | | }
|
| | |
| | | * @return 结果
|
| | | */
|
| | | @Override
|
| | | public String checkPostNameUnique(SysPost post)
|
| | | public boolean checkPostNameUnique(SysPost post)
|
| | | {
|
| | | Long postId = StringUtils.isNull(post.getPostId()) ? -1L : post.getPostId();
|
| | | SysPost info = postMapper.checkPostNameUnique(post.getPostName());
|
| | |
| | | * @return 结果
|
| | | */
|
| | | @Override
|
| | | public String checkPostCodeUnique(SysPost post)
|
| | | public boolean checkPostCodeUnique(SysPost post)
|
| | | {
|
| | | Long postId = StringUtils.isNull(post.getPostId()) ? -1L : post.getPostId();
|
| | | SysPost info = postMapper.checkPostCodeUnique(post.getPostCode());
|
| | |
| | | *
|
| | | * @param postIds 需要删除的岗位ID
|
| | | * @return 结果
|
| | | * @throws Exception 异常
|
| | | */
|
| | | @Override
|
| | | public int deletePostByIds(Long[] postIds)
|