package com.ruoyi.system.service.impl;


import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.speak.ZxSpeak;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ZxSpeakMapper;
import com.ruoyi.system.service.IZxSpeakService;

import java.util.List;

/**
 * 政协发言Service业务层处理
 * 
 * @author boman
 * @date 2024-03-07
 */
@Service
public class ZxSpeakServiceImpl implements IZxSpeakService 
{
    @Autowired
    private ZxSpeakMapper zxSpeakMapper;

    /**
     * 查询政协发言
     * 
     * @param speakId 政协发言主键
     * @return 政协发言
     */
    @Override
    public ZxSpeak selectZxSpeakBySpeakId(Long speakId)
    {
        return zxSpeakMapper.selectZxSpeakBySpeakId(speakId);
    }

    /**
     * 查询政协发言列表
     * 
     * @param zxSpeak 政协发言
     * @return 政协发言
     */
    @Override
    public List<ZxSpeak> selectZxSpeakList(ZxSpeak zxSpeak)
    {
        return zxSpeakMapper.selectZxSpeakList(zxSpeak);
    }

    /**
     * 新增政协发言
     * 
     * @param zxSpeak 政协发言
     * @return 结果
     */
    @Override
    public int insertZxSpeak(ZxSpeak zxSpeak)
    {
        zxSpeak.setCreateTime(DateUtils.getNowDate());
        return zxSpeakMapper.insertZxSpeak(zxSpeak);
    }

    /**
     * 修改政协发言
     * 
     * @param zxSpeak 政协发言
     * @return 结果
     */
    @Override
    public int updateZxSpeak(ZxSpeak zxSpeak)
    {
        zxSpeak.setUpdateTime(DateUtils.getNowDate());
        return zxSpeakMapper.updateZxSpeak(zxSpeak);
    }

    /**
     * 批量删除政协发言
     * 
     * @param speakIds 需要删除的政协发言主键
     * @return 结果
     */
    @Override
    public int deleteZxSpeakBySpeakIds(Long[] speakIds)
    {
        return zxSpeakMapper.deleteZxSpeakBySpeakIds(speakIds);
    }

    /**
     * 删除政协发言信息
     * 
     * @param speakId 政协发言主键
     * @return 结果
     */
    @Override
    public int deleteZxSpeakBySpeakId(Long speakId)
    {
        return zxSpeakMapper.deleteZxSpeakBySpeakId(speakId);
    }
}
