package com.ruoyi.hezhi.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.hezhi.domain.TbConferencePeople;
import com.ruoyi.hezhi.mapper.TbConferencePeopleMapper;
import com.ruoyi.hezhi.service.ITbConferencePeopleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 数字教育大会参会嘉宾Service业务层处理
 *
 * @author ruoyi
 * @date 2024-10-29
 */
@Service
public class TbConferencePeopleServiceImpl implements ITbConferencePeopleService
{
    @Autowired
    private TbConferencePeopleMapper tbConferencePeopleMapper;

    /**
     * 查询数字教育大会参会嘉宾
     *
     * @param conferencePeopleId 数字教育大会参会嘉宾主键
     * @return 数字教育大会参会嘉宾
     */
    @Override
    public TbConferencePeople selectTbConferencePeopleByConferencePeopleId(Long conferencePeopleId)
    {
        return tbConferencePeopleMapper.selectTbConferencePeopleByConferencePeopleId(conferencePeopleId);
    }

    /**
     * 查询数字教育大会参会嘉宾列表
     *
     * @param tbConferencePeople 数字教育大会参会嘉宾
     * @return 数字教育大会参会嘉宾
     */
    @Override
    public List<TbConferencePeople> selectTbConferencePeopleList(TbConferencePeople tbConferencePeople)
    {
        return tbConferencePeopleMapper.selectTbConferencePeopleList(tbConferencePeople);
    }

    /**
     * 新增数字教育大会参会嘉宾
     *
     * @param tbConferencePeople 数字教育大会参会嘉宾
     * @return 结果
     */
    @Override
    public int insertTbConferencePeople(TbConferencePeople tbConferencePeople)
    {
        tbConferencePeople.setCreateTime(DateUtils.getNowDate());
        return tbConferencePeopleMapper.insertTbConferencePeople(tbConferencePeople);
    }

    /**
     * 修改数字教育大会参会嘉宾
     *
     * @param tbConferencePeople 数字教育大会参会嘉宾
     * @return 结果
     */
    @Override
    public int updateTbConferencePeople(TbConferencePeople tbConferencePeople)
    {
        tbConferencePeople.setUpdateTime(DateUtils.getNowDate());
        return tbConferencePeopleMapper.updateTbConferencePeople(tbConferencePeople);
    }

    /**
     * 批量删除数字教育大会参会嘉宾
     *
     * @param conferencePeopleIds 需要删除的数字教育大会参会嘉宾主键
     * @return 结果
     */
    @Override
    public int deleteTbConferencePeopleByConferencePeopleIds(Long[] conferencePeopleIds)
    {
        return tbConferencePeopleMapper.deleteTbConferencePeopleByConferencePeopleIds(conferencePeopleIds);
    }

    /**
     * 删除数字教育大会参会嘉宾信息
     *
     * @param conferencePeopleId 数字教育大会参会嘉宾主键
     * @return 结果
     */
    @Override
    public int deleteTbConferencePeopleByConferencePeopleId(Long conferencePeopleId)
    {
        return tbConferencePeopleMapper.deleteTbConferencePeopleByConferencePeopleId(conferencePeopleId);
    }

    /**
     * 参会嘉宾列表
     *
     * @param params 参数
     * @return 参会嘉宾列表
     */
    @Override
    public List<Map<String, Object>> getConferencePeopleList(Map<String, Object> params) {
        return tbConferencePeopleMapper.getConferencePeopleList(params);
    }
}
