package com.yanzhu.manage.service.impl;

import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.manage.domain.ProProjectInfoUsers;
import com.yanzhu.manage.mapper.ProProjectInfoUsersMapper;
import com.yanzhu.manage.service.IProProjectInfoUsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 项目人员Service业务层处理
 * 
 * @author JiangYuQi
 * @date 2024-08-25
 */
@Service
public class ProProjectInfoUsersServiceImpl implements IProProjectInfoUsersService 
{
    @Autowired
    private ProProjectInfoUsersMapper proProjectInfoUsersMapper;

    /**
     * 查询项目人员
     * 
     * @param id 项目人员主键
     * @return 项目人员
     */
    @Override
    public ProProjectInfoUsers selectProProjectInfoUsersById(Long id)
    {
        return proProjectInfoUsersMapper.selectProProjectInfoUsersById(id);
    }

    /**
     * 查询项目人员列表
     * 
     * @param proProjectInfoUsers 项目人员
     * @return 项目人员
     */
    @Override
    public List<ProProjectInfoUsers> selectProProjectInfoUsersList(ProProjectInfoUsers proProjectInfoUsers)
    {
        return proProjectInfoUsersMapper.selectProProjectInfoUsersList(proProjectInfoUsers);
    }

    /**
     * 新增项目人员
     * 
     * @param proProjectInfoUsers 项目人员
     * @return 结果
     */
    @Override
    public int insertProProjectInfoUsers(ProProjectInfoUsers proProjectInfoUsers)
    {
        proProjectInfoUsers.setCreateTime(DateUtils.getNowDate());
        return proProjectInfoUsersMapper.insertProProjectInfoUsers(proProjectInfoUsers);
    }

    /**
     * 修改项目人员
     * 
     * @param proProjectInfoUsers 项目人员
     * @return 结果
     */
    @Override
    public int updateProProjectInfoUsers(ProProjectInfoUsers proProjectInfoUsers)
    {
        proProjectInfoUsers.setUpdateTime(DateUtils.getNowDate());
        return proProjectInfoUsersMapper.updateProProjectInfoUsers(proProjectInfoUsers);
    }

    /**
     * 批量删除项目人员
     * 
     * @param ids 需要删除的项目人员主键
     * @return 结果
     */
    @Override
    public int deleteProProjectInfoUsersByIds(Long[] ids)
    {
        return proProjectInfoUsersMapper.deleteProProjectInfoUsersByIds(ids);
    }

    /**
     * 删除项目人员信息
     * 
     * @param id 项目人员主键
     * @return 结果
     */
    @Override
    public int deleteProProjectInfoUsersById(Long id)
    {
        return proProjectInfoUsersMapper.deleteProProjectInfoUsersById(id);
    }
}
