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.CpsMeetingEnterpriseMapper;
import com.ruoyi.system.domain.CpsMeetingEnterprise;
import com.ruoyi.system.service.ICpsMeetingEnterpriseService;

/**
 * cps_meeting_enterprise 与会企业Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-14
 */
@Service
public class CpsMeetingEnterpriseServiceImpl implements ICpsMeetingEnterpriseService 
{
    @Autowired
    private CpsMeetingEnterpriseMapper cpsMeetingEnterpriseMapper;

    /**
     * 查询cps_meeting_enterprise 与会企业
     * 
     * @param id cps_meeting_enterprise 与会企业主键
     * @return cps_meeting_enterprise 与会企业
     */
    @Override
    public CpsMeetingEnterprise selectCpsMeetingEnterpriseById(Long id)
    {
        return cpsMeetingEnterpriseMapper.selectCpsMeetingEnterpriseById(id);
    }

    /**
     * 查询cps_meeting_enterprise 与会企业列表
     * 
     * @param cpsMeetingEnterprise cps_meeting_enterprise 与会企业
     * @return cps_meeting_enterprise 与会企业
     */
    @Override
    public List<CpsMeetingEnterprise> selectCpsMeetingEnterpriseList(CpsMeetingEnterprise cpsMeetingEnterprise)
    {
        return cpsMeetingEnterpriseMapper.selectCpsMeetingEnterpriseList(cpsMeetingEnterprise);
    }

    /**
     * 新增cps_meeting_enterprise 与会企业
     * 
     * @param cpsMeetingEnterprise cps_meeting_enterprise 与会企业
     * @return 结果
     */
    @Override
    public int insertCpsMeetingEnterprise(CpsMeetingEnterprise cpsMeetingEnterprise)
    {
        cpsMeetingEnterprise.setCreateTime(DateUtils.getNowDate());
        return cpsMeetingEnterpriseMapper.insertCpsMeetingEnterprise(cpsMeetingEnterprise);
    }

    /**
     * 修改cps_meeting_enterprise 与会企业
     * 
     * @param cpsMeetingEnterprise cps_meeting_enterprise 与会企业
     * @return 结果
     */
    @Override
    public int updateCpsMeetingEnterprise(CpsMeetingEnterprise cpsMeetingEnterprise)
    {
        cpsMeetingEnterprise.setUpdateTime(DateUtils.getNowDate());
        return cpsMeetingEnterpriseMapper.updateCpsMeetingEnterprise(cpsMeetingEnterprise);
    }

    /**
     * 批量删除cps_meeting_enterprise 与会企业
     * 
     * @param ids 需要删除的cps_meeting_enterprise 与会企业主键
     * @return 结果
     */
    @Override
    public int deleteCpsMeetingEnterpriseByIds(Long[] ids)
    {
        return cpsMeetingEnterpriseMapper.deleteCpsMeetingEnterpriseByIds(ids);
    }

    /**
     * 删除cps_meeting_enterprise 与会企业信息
     * 
     * @param id cps_meeting_enterprise 与会企业主键
     * @return 结果
     */
    @Override
    public int deleteCpsMeetingEnterpriseById(Long id)
    {
        return cpsMeetingEnterpriseMapper.deleteCpsMeetingEnterpriseById(id);
    }
}
