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.CpsMeetingEnterpriseTripInfoMapper;
import com.ruoyi.system.domain.CpsMeetingEnterpriseTripInfo;
import com.ruoyi.system.service.ICpsMeetingEnterpriseTripInfoService;

/**
 * cps_meeting_enterprise_trip_info与会企业行程信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-14
 */
@Service
public class CpsMeetingEnterpriseTripInfoServiceImpl implements ICpsMeetingEnterpriseTripInfoService 
{
    @Autowired
    private CpsMeetingEnterpriseTripInfoMapper cpsMeetingEnterpriseTripInfoMapper;

    /**
     * 查询cps_meeting_enterprise_trip_info与会企业行程信息
     * 
     * @param id cps_meeting_enterprise_trip_info与会企业行程信息主键
     * @return cps_meeting_enterprise_trip_info与会企业行程信息
     */
    @Override
    public CpsMeetingEnterpriseTripInfo selectCpsMeetingEnterpriseTripInfoById(Long id)
    {
        return cpsMeetingEnterpriseTripInfoMapper.selectCpsMeetingEnterpriseTripInfoById(id);
    }

    /**
     * 查询cps_meeting_enterprise_trip_info与会企业行程信息列表
     * 
     * @param cpsMeetingEnterpriseTripInfo cps_meeting_enterprise_trip_info与会企业行程信息
     * @return cps_meeting_enterprise_trip_info与会企业行程信息
     */
    @Override
    public List<CpsMeetingEnterpriseTripInfo> selectCpsMeetingEnterpriseTripInfoList(CpsMeetingEnterpriseTripInfo cpsMeetingEnterpriseTripInfo)
    {
        return cpsMeetingEnterpriseTripInfoMapper.selectCpsMeetingEnterpriseTripInfoList(cpsMeetingEnterpriseTripInfo);
    }

    /**
     * 新增cps_meeting_enterprise_trip_info与会企业行程信息
     * 
     * @param cpsMeetingEnterpriseTripInfo cps_meeting_enterprise_trip_info与会企业行程信息
     * @return 结果
     */
    @Override
    public int insertCpsMeetingEnterpriseTripInfo(CpsMeetingEnterpriseTripInfo cpsMeetingEnterpriseTripInfo)
    {
        cpsMeetingEnterpriseTripInfo.setCreateTime(DateUtils.getNowDate());
        return cpsMeetingEnterpriseTripInfoMapper.insertCpsMeetingEnterpriseTripInfo(cpsMeetingEnterpriseTripInfo);
    }

    /**
     * 修改cps_meeting_enterprise_trip_info与会企业行程信息
     * 
     * @param cpsMeetingEnterpriseTripInfo cps_meeting_enterprise_trip_info与会企业行程信息
     * @return 结果
     */
    @Override
    public int updateCpsMeetingEnterpriseTripInfo(CpsMeetingEnterpriseTripInfo cpsMeetingEnterpriseTripInfo)
    {
        cpsMeetingEnterpriseTripInfo.setUpdateTime(DateUtils.getNowDate());
        return cpsMeetingEnterpriseTripInfoMapper.updateCpsMeetingEnterpriseTripInfo(cpsMeetingEnterpriseTripInfo);
    }

    /**
     * 批量删除cps_meeting_enterprise_trip_info与会企业行程信息
     * 
     * @param ids 需要删除的cps_meeting_enterprise_trip_info与会企业行程信息主键
     * @return 结果
     */
    @Override
    public int deleteCpsMeetingEnterpriseTripInfoByIds(Long[] ids)
    {
        return cpsMeetingEnterpriseTripInfoMapper.deleteCpsMeetingEnterpriseTripInfoByIds(ids);
    }

    /**
     * 删除cps_meeting_enterprise_trip_info与会企业行程信息信息
     * 
     * @param id cps_meeting_enterprise_trip_info与会企业行程信息主键
     * @return 结果
     */
    @Override
    public int deleteCpsMeetingEnterpriseTripInfoById(Long id)
    {
        return cpsMeetingEnterpriseTripInfoMapper.deleteCpsMeetingEnterpriseTripInfoById(id);
    }
}
