package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.InvestigateUserMapper;
import com.ruoyi.system.domain.InvestigateUser;
import com.ruoyi.system.service.IInvestigateUserService;

/**
 * 考察人员信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-10
 */
@Service
public class InvestigateUserServiceImpl implements IInvestigateUserService 
{
    @Autowired
    private InvestigateUserMapper investigateUserMapper;

    /**
     * 查询考察人员信息
     * 
     * @param id 考察人员信息主键
     * @return 考察人员信息
     */
    @Override
    public InvestigateUser selectInvestigateUserById(Long id)
    {
        return investigateUserMapper.selectInvestigateUserById(id);
    }

    /**
     * 查询考察人员信息列表
     * 
     * @param investigateUser 考察人员信息
     * @return 考察人员信息
     */
    @Override
    public List<InvestigateUser> selectInvestigateUserList(InvestigateUser investigateUser)
    {
        return investigateUserMapper.selectInvestigateUserList(investigateUser);
    }

    /**
     * 新增考察人员信息
     * 
     * @param investigateUser 考察人员信息
     * @return 结果
     */
    @Override
    public int insertInvestigateUser(InvestigateUser investigateUser)
    {
        investigateUser.setCreateTime(DateUtils.getNowDate());
        return investigateUserMapper.insertInvestigateUser(investigateUser);
    }

    /**
     * 修改考察人员信息
     * 
     * @param investigateUser 考察人员信息
     * @return 结果
     */
    @Override
    public int updateInvestigateUser(InvestigateUser investigateUser)
    {
        investigateUser.setUpdateTime(DateUtils.getNowDate());
        return investigateUserMapper.updateInvestigateUser(investigateUser);
    }

    /**
     * 批量删除考察人员信息
     * 
     * @param ids 需要删除的考察人员信息主键
     * @return 结果
     */
    @Override
    public int deleteInvestigateUserByIds(Long[] ids)
    {
        return investigateUserMapper.deleteInvestigateUserByIds(ids);
    }

    /**
     * 删除考察人员信息信息
     * 
     * @param id 考察人员信息主键
     * @return 结果
     */
    @Override
    public int deleteInvestigateUserById(Long id)
    {
        return investigateUserMapper.deleteInvestigateUserById(id);
    }
}
