package com.yanzhu.manage.service.impl;

import java.util.List;
import com.yanzhu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yanzhu.manage.mapper.ProProjectInfoSettingMapper;
import com.yanzhu.manage.domain.ProProjectInfoSetting;
import com.yanzhu.manage.service.IProProjectInfoSettingService;

/**
 * 项目设置Service业务层处理
 * 
 * @author JiangYuQi
 * @date 2024-08-25
 */
@Service
public class ProProjectInfoSettingServiceImpl implements IProProjectInfoSettingService 
{
    @Autowired
    private ProProjectInfoSettingMapper proProjectInfoSettingMapper;

    /**
     * 查询项目设置
     * 
     * @param id 项目设置主键
     * @return 项目设置
     */
    @Override
    public ProProjectInfoSetting selectProProjectInfoSettingById(Long id)
    {
        return proProjectInfoSettingMapper.selectProProjectInfoSettingById(id);
    }

    /**
     * 查询项目设置列表
     * 
     * @param proProjectInfoSetting 项目设置
     * @return 项目设置
     */
    @Override
    public List<ProProjectInfoSetting> selectProProjectInfoSettingList(ProProjectInfoSetting proProjectInfoSetting)
    {
        return proProjectInfoSettingMapper.selectProProjectInfoSettingList(proProjectInfoSetting);
    }

    /**
     * 新增项目设置
     * 
     * @param proProjectInfoSetting 项目设置
     * @return 结果
     */
    @Override
    public int insertProProjectInfoSetting(ProProjectInfoSetting proProjectInfoSetting)
    {
        proProjectInfoSetting.setCreateTime(DateUtils.getNowDate());
        return proProjectInfoSettingMapper.insertProProjectInfoSetting(proProjectInfoSetting);
    }

    /**
     * 修改项目设置
     * 
     * @param proProjectInfoSetting 项目设置
     * @return 结果
     */
    @Override
    public int updateProProjectInfoSetting(ProProjectInfoSetting proProjectInfoSetting)
    {
        proProjectInfoSetting.setUpdateTime(DateUtils.getNowDate());
        return proProjectInfoSettingMapper.updateProProjectInfoSetting(proProjectInfoSetting);
    }

    /**
     * 批量删除项目设置
     * 
     * @param ids 需要删除的项目设置主键
     * @return 结果
     */
    @Override
    public int deleteProProjectInfoSettingByIds(Long[] ids)
    {
        return proProjectInfoSettingMapper.deleteProProjectInfoSettingByIds(ids);
    }

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