package com.dcs.hnyz.service.impl;

import java.util.Arrays;
import java.util.List;
import com.dcs.common.utils.DateUtils;
import com.dcs.hnyz.domain.vo.ScreenSettingsFormVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dcs.hnyz.mapper.ScreenSettingsMapper;
import com.dcs.hnyz.domain.ScreenSettings;
import com.dcs.hnyz.service.IScreenSettingsService;

/**
 * 大屏设置管理Service业务层处理
 * 
 * @author hmy
 * @date 2025-04-30
 */
@Service
public class ScreenSettingsServiceImpl implements IScreenSettingsService 
{
    @Autowired
    private ScreenSettingsMapper screenSettingsMapper;

    /**
     * 查询大屏设置管理
     * 
     * @param id 大屏设置管理主键
     * @return 大屏设置管理
     */
    @Override
    public ScreenSettings selectScreenSettingsById(Long id)
    {
        return screenSettingsMapper.selectById(id);
    }

    /**
     * 查询大屏设置管理列表
     * 
     * @param screenSettings 大屏设置管理
     * @return 大屏设置管理
     */
    @Override
    public List<ScreenSettings> selectScreenSettingsList(ScreenSettings screenSettings)
    {
        return screenSettingsMapper.selectScreenSettingsList(screenSettings);
    }

    /**
     * 新增大屏设置管理
     * 
     * @param screenSettings 大屏设置管理
     * @return 结果
     */
    @Override
    public int insertScreenSettings(ScreenSettings screenSettings)
    {
        screenSettings.setCreateTime(DateUtils.getNowDate());
        return screenSettingsMapper.insert(screenSettings);
    }

    /**
     * 修改大屏设置管理
     * 
     * @param screenSettings 大屏设置管理
     * @return 结果
     */
    @Override
    public int updateScreenSettings(ScreenSettings screenSettings)
    {
        screenSettings.setUpdateTime(DateUtils.getNowDate());
        return screenSettingsMapper.updateById(screenSettings);
    }

    /**
     * 批量删除大屏设置管理
     * 
     * @param ids 需要删除的大屏设置管理主键
     * @return 结果
     */
    @Override
    public int deleteScreenSettingsByIds(Long[] ids)
    {
        return screenSettingsMapper.deleteBatchIds(Arrays.asList(ids));
    }

    /**
     * 删除大屏设置管理信息
     * 
     * @param id 大屏设置管理主键
     * @return 结果
     */
    @Override
    public int deleteScreenSettingsById(Long id)
    {
        return screenSettingsMapper.deleteById(id);
    }

    @Override
    public List<ScreenSettingsFormVO> selectScreenSettingsFormList(ScreenSettings screenSettings) {
        return screenSettingsMapper.selectScreenSettingsFormList(screenSettings);
    }
}
