package com.flossom.system.service.impl;

import java.util.List;

import com.flossom.common.core.domain.entity.WxModeOpenSource;
import com.flossom.common.core.mapper.WxModeOpenSourceMapper;
import com.flossom.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.flossom.system.service.IWxModeOpenSourceService;

/**
 * IOT仪器弹出视频Service业务层处理
 *
 * @author flossom
 * @date 2024-01-29
 */
@Service
public class WxModeOpenSourceServiceImpl implements IWxModeOpenSourceService
{
    @Autowired
    private WxModeOpenSourceMapper wxModeOpenSourceMapper;

    /**
     * 查询IOT仪器弹出视频
     *
     * @param id IOT仪器弹出视频主键
     * @return IOT仪器弹出视频
     */
    @Override
    public WxModeOpenSource selectWxModeOpenSourceById(Long id)
    {
        return wxModeOpenSourceMapper.selectWxModeOpenSourceById(id);
    }

    /**
     * 查询IOT仪器弹出视频列表
     *
     * @param wxModeOpenSource IOT仪器弹出视频
     * @return IOT仪器弹出视频
     */
    @Override
    public List<WxModeOpenSource> selectWxModeOpenSourceList(WxModeOpenSource wxModeOpenSource)
    {
        return wxModeOpenSourceMapper.selectWxModeOpenSourceList(wxModeOpenSource);
    }

    /**
     * 新增IOT仪器弹出视频
     *
     * @param wxModeOpenSource IOT仪器弹出视频
     * @return 结果
     */
    @Override
    public int insertWxModeOpenSource(WxModeOpenSource wxModeOpenSource)
    {
        wxModeOpenSource.setCreateTime(DateUtils.getNowDate());
        return wxModeOpenSourceMapper.insertWxModeOpenSource(wxModeOpenSource);
    }

    /**
     * 修改IOT仪器弹出视频
     *
     * @param wxModeOpenSource IOT仪器弹出视频
     * @return 结果
     */
    @Override
    public int updateWxModeOpenSource(WxModeOpenSource wxModeOpenSource)
    {
        return wxModeOpenSourceMapper.updateWxModeOpenSource(wxModeOpenSource);
    }

    /**
     * 批量删除IOT仪器弹出视频
     *
     * @param ids 需要删除的IOT仪器弹出视频主键
     * @return 结果
     */
    @Override
    public int deleteWxModeOpenSourceByIds(Long[] ids)
    {
        return wxModeOpenSourceMapper.deleteWxModeOpenSourceByIds(ids);
    }

    /**
     * 删除IOT仪器弹出视频信息
     *
     * @param id IOT仪器弹出视频主键
     * @return 结果
     */
    @Override
    public int deleteWxModeOpenSourceById(Long id)
    {
        return wxModeOpenSourceMapper.deleteWxModeOpenSourceById(id);
    }
}
