package com.fs.hospital.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.hospital.mapper.HospitalUserPostMapper;
import com.fs.hospital.domain.HospitalUserPost;
import com.fs.hospital.service.IHospitalUserPostService;

/**
 * 用户与岗位关联Service业务层处理
 * 
 * @author fs
 * @date 2024-02-27
 */
@Service
public class HospitalUserPostServiceImpl implements IHospitalUserPostService 
{
    @Autowired
    private HospitalUserPostMapper hospitalUserPostMapper;

    /**
     * 查询用户与岗位关联
     * 
     * @param userId 用户与岗位关联主键
     * @return 用户与岗位关联
     */
    @Override
    public HospitalUserPost selectHospitalUserPostByUserId(Long userId)
    {
        return hospitalUserPostMapper.selectHospitalUserPostByUserId(userId);
    }

    /**
     * 查询用户与岗位关联列表
     * 
     * @param hospitalUserPost 用户与岗位关联
     * @return 用户与岗位关联
     */
    @Override
    public List<HospitalUserPost> selectHospitalUserPostList(HospitalUserPost hospitalUserPost)
    {
        return hospitalUserPostMapper.selectHospitalUserPostList(hospitalUserPost);
    }

    /**
     * 新增用户与岗位关联
     * 
     * @param hospitalUserPost 用户与岗位关联
     * @return 结果
     */
    @Override
    public int insertHospitalUserPost(HospitalUserPost hospitalUserPost)
    {
        return hospitalUserPostMapper.insertHospitalUserPost(hospitalUserPost);
    }

    /**
     * 修改用户与岗位关联
     * 
     * @param hospitalUserPost 用户与岗位关联
     * @return 结果
     */
    @Override
    public int updateHospitalUserPost(HospitalUserPost hospitalUserPost)
    {
        return hospitalUserPostMapper.updateHospitalUserPost(hospitalUserPost);
    }

    /**
     * 批量删除用户与岗位关联
     * 
     * @param userIds 需要删除的用户与岗位关联主键
     * @return 结果
     */
    @Override
    public int deleteHospitalUserPostByUserIds(Long[] userIds)
    {
        return hospitalUserPostMapper.deleteHospitalUserPostByUserIds(userIds);
    }

    /**
     * 删除用户与岗位关联信息
     * 
     * @param userId 用户与岗位关联主键
     * @return 结果
     */
    @Override
    public int deleteHospitalUserPostByUserId(Long userId)
    {
        return hospitalUserPostMapper.deleteHospitalUserPostByUserId(userId);
    }
}
