package com.yanzhu.project.service.impl;

import java.util.List;
import com.yanzhu.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yanzhu.project.mapper.ProProjectInfoMapper;
import com.yanzhu.project.domain.ProProjectInfo;
import com.yanzhu.project.service.IProProjectInfoService;

/**
 * 项目信息Service业务层处理
 * 
 * @author yanZhu
 * @date 2024-02-23
 */
@Service
public class ProProjectInfoServiceImpl implements IProProjectInfoService 
{
    @Autowired
    private ProProjectInfoMapper proProjectInfoMapper;

    /**
     * 查询项目信息
     * 
     * @param id 项目信息主键
     * @return 项目信息
     */
    @Override
    public ProProjectInfo selectProProjectInfoById(Long id)
    {
        return proProjectInfoMapper.selectProProjectInfoById(id);
    }

    /**
     * 查询项目信息列表
     * 
     * @param proProjectInfo 项目信息
     * @return 项目信息
     */
    @Override
    public List<ProProjectInfo> selectProProjectInfoList(ProProjectInfo proProjectInfo)
    {
        return proProjectInfoMapper.selectProProjectInfoList(proProjectInfo);
    }

    /**
     * 新增项目信息
     * 
     * @param proProjectInfo 项目信息
     * @return 结果
     */
    @Override
    public int insertProProjectInfo(ProProjectInfo proProjectInfo)
    {
        proProjectInfo.setCreateTime(DateUtils.getNowDate());
        return proProjectInfoMapper.insertProProjectInfo(proProjectInfo);
    }

    /**
     * 修改项目信息
     * 
     * @param proProjectInfo 项目信息
     * @return 结果
     */
    @Override
    public int updateProProjectInfo(ProProjectInfo proProjectInfo)
    {
        proProjectInfo.setUpdateTime(DateUtils.getNowDate());
        return proProjectInfoMapper.updateProProjectInfo(proProjectInfo);
    }

    /**
     * 批量删除项目信息
     * 
     * @param ids 需要删除的项目信息主键
     * @return 结果
     */
    @Override
    public int deleteProProjectInfoByIds(Long[] ids)
    {
        return proProjectInfoMapper.deleteProProjectInfoByIds(ids);
    }

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