package com.ruoyi.system.service.impl.projectV2;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.projectV2.ZsyzProjectDept;
import com.ruoyi.system.mapper.projectV2.ZsyzProjectDeptMapper;
import com.ruoyi.system.service.projectV2.IZsyzProjectDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 招商引资_项目和部门关联Service业务层处理
 * 
 * @author boman
 * @date 2023-02-23
 */
@Service
public class ZsyzProjectDeptServiceImpl implements IZsyzProjectDeptService
{
    @Autowired
    private ZsyzProjectDeptMapper zsyzProjectDeptMapper;

    /**
     * 查询招商引资_项目和部门关联
     * 
     * @param id 招商引资_项目和部门关联ID
     * @return 招商引资_项目和部门关联
     */
    @Override
    public ZsyzProjectDept selectZsyzProjectDeptById(Long id)
    {
        return zsyzProjectDeptMapper.selectZsyzProjectDeptById(id);
    }

    /**
     * 查询是否回复过
     * @param zsyzProjectDept
     * @return
     */
    @Override
    public ZsyzProjectDept selectZsyzProjectDeptByXmId(ZsyzProjectDept zsyzProjectDept) {
        return  zsyzProjectDeptMapper.selectZsyzProjectDeptByXmId(zsyzProjectDept);
    }

    /**
     * 查询招商引资_项目和部门关联列表
     * 
     * @param zsyzProjectDept 招商引资_项目和部门关联
     * @return 招商引资_项目和部门关联
     */
    @Override
    public List<ZsyzProjectDept> selectZsyzProjectDeptList(ZsyzProjectDept zsyzProjectDept)
    {
        return zsyzProjectDeptMapper.selectZsyzProjectDeptList(zsyzProjectDept);
    }

    /**
     * 新增招商引资_项目和部门关联
     * 
     * @param zsyzProjectDept 招商引资_项目和部门关联
     * @return 结果
     */
    @Override
    public int insertZsyzProjectDept(ZsyzProjectDept zsyzProjectDept)
    {
        zsyzProjectDept.setCreateTime(DateUtils.getNowDate());
        return zsyzProjectDeptMapper.insertZsyzProjectDept(zsyzProjectDept);
    }

    @Override
    public int deleteZsyzProjectDeptByXmId(Long xmId) {
        return zsyzProjectDeptMapper.deleteZsyzProjectDeptByXmId(xmId);
    }

    /**
     * 修改招商引资_项目和部门关联
     * 
     * @param zsyzProjectDept 招商引资_项目和部门关联
     * @return 结果
     */
    @Override
    public int updateZsyzProjectDept(ZsyzProjectDept zsyzProjectDept)
    {
        zsyzProjectDept.setUpdateTime(DateUtils.getNowDate());
        return zsyzProjectDeptMapper.updateZsyzProjectDept(zsyzProjectDept);
    }

    /**
     * 修改招商引资_项目和部门关联
     *
     * @param zsyzProjectDept 招商引资_项目和部门关联
     * @return 结果
     */
    @Override
    public int updateZsyzProjectDeptByXmId(ZsyzProjectDept zsyzProjectDept) {
        return   zsyzProjectDeptMapper.updateZsyzProjectDeptByXmId(zsyzProjectDept);
    }

    /**
     * 批量删除招商引资_项目和部门关联
     * 
     * @param ids 需要删除的招商引资_项目和部门关联ID
     * @return 结果
     */
    @Override
    public int deleteZsyzProjectDeptByIds(Long[] ids)
    {
        return zsyzProjectDeptMapper.deleteZsyzProjectDeptByIds(ids);
    }

    /**
     * 删除招商引资_项目和部门关联信息
     * 
     * @param id 招商引资_项目和部门关联ID
     * @return 结果
     */
    @Override
    public int deleteZsyzProjectDeptById(Long id)
    {
        return zsyzProjectDeptMapper.deleteZsyzProjectDeptById(id);
    }
}
