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.CpsGlbMsgMapper;
import com.ruoyi.system.domain.CpsGlbMsg;
import com.ruoyi.system.service.ICpsGlbMsgService;

/**
 * cps_glb_msg 全局消息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-14
 */
@Service
public class CpsGlbMsgServiceImpl implements ICpsGlbMsgService 
{
    @Autowired
    private CpsGlbMsgMapper cpsGlbMsgMapper;

    /**
     * 查询cps_glb_msg 全局消息
     * 
     * @param id cps_glb_msg 全局消息主键
     * @return cps_glb_msg 全局消息
     */
    @Override
    public CpsGlbMsg selectCpsGlbMsgById(Long id)
    {
        return cpsGlbMsgMapper.selectCpsGlbMsgById(id);
    }

    /**
     * 查询cps_glb_msg 全局消息列表
     * 
     * @param cpsGlbMsg cps_glb_msg 全局消息
     * @return cps_glb_msg 全局消息
     */
    @Override
    public List<CpsGlbMsg> selectCpsGlbMsgList(CpsGlbMsg cpsGlbMsg)
    {
        return cpsGlbMsgMapper.selectCpsGlbMsgList(cpsGlbMsg);
    }

    /**
     * 新增cps_glb_msg 全局消息
     * 
     * @param cpsGlbMsg cps_glb_msg 全局消息
     * @return 结果
     */
    @Override
    public int insertCpsGlbMsg(CpsGlbMsg cpsGlbMsg)
    {
        cpsGlbMsg.setCreateTime(DateUtils.getNowDate());
        return cpsGlbMsgMapper.insertCpsGlbMsg(cpsGlbMsg);
    }

    /**
     * 修改cps_glb_msg 全局消息
     * 
     * @param cpsGlbMsg cps_glb_msg 全局消息
     * @return 结果
     */
    @Override
    public int updateCpsGlbMsg(CpsGlbMsg cpsGlbMsg)
    {
        cpsGlbMsg.setUpdateTime(DateUtils.getNowDate());
        return cpsGlbMsgMapper.updateCpsGlbMsg(cpsGlbMsg);
    }

    /**
     * 批量删除cps_glb_msg 全局消息
     * 
     * @param ids 需要删除的cps_glb_msg 全局消息主键
     * @return 结果
     */
    @Override
    public int deleteCpsGlbMsgByIds(Long[] ids)
    {
        return cpsGlbMsgMapper.deleteCpsGlbMsgByIds(ids);
    }

    /**
     * 删除cps_glb_msg 全局消息信息
     * 
     * @param id cps_glb_msg 全局消息主键
     * @return 结果
     */
    @Override
    public int deleteCpsGlbMsgById(Long id)
    {
        return cpsGlbMsgMapper.deleteCpsGlbMsgById(id);
    }
}
