package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CpsGlbViewCfgMapper;
import com.ruoyi.system.domain.CpsGlbViewCfg;
import com.ruoyi.system.service.ICpsGlbViewCfgService;

/**
 * cps_glb_view_cfg 展示配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-14
 */
@Service
public class CpsGlbViewCfgServiceImpl implements ICpsGlbViewCfgService 
{
    @Autowired
    private CpsGlbViewCfgMapper cpsGlbViewCfgMapper;

    /**
     * 查询cps_glb_view_cfg 展示配置
     * 
     * @param id cps_glb_view_cfg 展示配置主键
     * @return cps_glb_view_cfg 展示配置
     */
    @Override
    public CpsGlbViewCfg selectCpsGlbViewCfgById(Long id)
    {
        return cpsGlbViewCfgMapper.selectCpsGlbViewCfgById(id);
    }

    /**
     * 查询cps_glb_view_cfg 展示配置列表
     * 
     * @param cpsGlbViewCfg cps_glb_view_cfg 展示配置
     * @return cps_glb_view_cfg 展示配置
     */
    @Override
    public List<CpsGlbViewCfg> selectCpsGlbViewCfgList(CpsGlbViewCfg cpsGlbViewCfg)
    {
        return cpsGlbViewCfgMapper.selectCpsGlbViewCfgList(cpsGlbViewCfg);
    }

    /**
     * 新增cps_glb_view_cfg 展示配置
     * 
     * @param cpsGlbViewCfg cps_glb_view_cfg 展示配置
     * @return 结果
     */
    @Override
    public int insertCpsGlbViewCfg(CpsGlbViewCfg cpsGlbViewCfg)
    {
        cpsGlbViewCfg.setCreateTime(DateUtils.getNowDate());
        return cpsGlbViewCfgMapper.insertCpsGlbViewCfg(cpsGlbViewCfg);
    }

    /**
     * 修改cps_glb_view_cfg 展示配置
     * 
     * @param cpsGlbViewCfg cps_glb_view_cfg 展示配置
     * @return 结果
     */
    @Override
    public int updateCpsGlbViewCfg(CpsGlbViewCfg cpsGlbViewCfg)
    {
        cpsGlbViewCfg.setUpdateTime(DateUtils.getNowDate());
        return cpsGlbViewCfgMapper.updateCpsGlbViewCfg(cpsGlbViewCfg);
    }

    /**
     * 批量删除cps_glb_view_cfg 展示配置
     * 
     * @param ids 需要删除的cps_glb_view_cfg 展示配置主键
     * @return 结果
     */
    @Override
    public int deleteCpsGlbViewCfgByIds(Long[] ids)
    {
        return cpsGlbViewCfgMapper.deleteCpsGlbViewCfgByIds(ids);
    }

    /**
     * 删除cps_glb_view_cfg 展示配置信息
     * 
     * @param id cps_glb_view_cfg 展示配置主键
     * @return 结果
     */
    @Override
    public int deleteCpsGlbViewCfgById(Long id)
    {
        return cpsGlbViewCfgMapper.deleteCpsGlbViewCfgById(id);
    }
}
