package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.HwSceneModeMapper;
import com.ruoyi.business.domain.HwSceneMode;
import com.ruoyi.business.service.IHwSceneModeService;

/**
 * 场景类型Service业务层处理
 * 
 * @author YINQ
 * @date 2023-08-31
 */
@Service
public class HwSceneModeServiceImpl implements IHwSceneModeService 
{
    @Autowired
    private HwSceneModeMapper hwSceneModeMapper;

    /**
     * 查询场景类型
     * 
     * @param sceneModeId 场景类型主键
     * @return 场景类型
     */
    @Override
    public HwSceneMode selectHwSceneModeBySceneModeId(Long sceneModeId)
    {
        return hwSceneModeMapper.selectHwSceneModeBySceneModeId(sceneModeId);
    }

    /**
     * 查询场景类型列表
     * 
     * @param hwSceneMode 场景类型
     * @return 场景类型
     */
    @Override
    public List<HwSceneMode> selectHwSceneModeList(HwSceneMode hwSceneMode)
    {
        return hwSceneModeMapper.selectHwSceneModeList(hwSceneMode);
    }

    /**
     * 新增场景类型
     * 
     * @param hwSceneMode 场景类型
     * @return 结果
     */
    @Override
    public int insertHwSceneMode(HwSceneMode hwSceneMode)
    {
        hwSceneMode.setCreateTime(DateUtils.getNowDate());
        return hwSceneModeMapper.insertHwSceneMode(hwSceneMode);
    }

    /**
     * 修改场景类型
     * 
     * @param hwSceneMode 场景类型
     * @return 结果
     */
    @Override
    public int updateHwSceneMode(HwSceneMode hwSceneMode)
    {
        hwSceneMode.setUpdateTime(DateUtils.getNowDate());
        return hwSceneModeMapper.updateHwSceneMode(hwSceneMode);
    }

    /**
     * 批量删除场景类型
     * 
     * @param sceneModeIds 需要删除的场景类型主键
     * @return 结果
     */
    @Override
    public int deleteHwSceneModeBySceneModeIds(Long[] sceneModeIds)
    {
        return hwSceneModeMapper.deleteHwSceneModeBySceneModeIds(sceneModeIds);
    }

    /**
     * 删除场景类型信息
     * 
     * @param sceneModeId 场景类型主键
     * @return 结果
     */
    @Override
    public int deleteHwSceneModeBySceneModeId(Long sceneModeId)
    {
        return hwSceneModeMapper.deleteHwSceneModeBySceneModeId(sceneModeId);
    }
}
