zouyu
2 天以前 848d609a35569b029bbdd5ab91c1df2a0f568819
src/main/java/com/ruoyi/project/system/service/impl/SysPostServiceImpl.java
@@ -1,6 +1,9 @@
package com.ruoyi.project.system.service.impl;
import java.util.Collections;
import java.util.List;
import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.constant.UserConstants;
@@ -32,6 +35,7 @@
     * @return 岗位信息集合
     */
    @Override
    @DataScope(tenantIdFelid = "p")
    public List<SysPost> selectPostList(SysPost post)
    {
        return postMapper.selectPostList(post);
@@ -67,7 +71,7 @@
     * @return 选中岗位ID列表
     */
    @Override
    public List<Integer> selectPostListByUserId(Long userId)
    public List<Long> selectPostListByUserId(Long userId)
    {
        return postMapper.selectPostListByUserId(userId);
    }
@@ -79,7 +83,7 @@
     * @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());
@@ -97,7 +101,7 @@
     * @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());
@@ -137,7 +141,6 @@
     * 
     * @param postIds 需要删除的岗位ID
     * @return 结果
     * @throws Exception 异常
     */
    @Override
    public int deletePostByIds(Long[] postIds)
@@ -176,4 +179,10 @@
    {
        return postMapper.updatePost(post);
    }
    @Override
    @DataScope(tenantIdFelid = "p")
    public List<SysPost> selectPostByTenantId(Long tenantId) {
        return postMapper.selectPostByTenantId(tenantId);
    }
}