package com.fs.qw.service.impl;


import com.fs.common.utils.DateUtils;
import com.fs.qw.domain.QwGroupMsgItem;
import com.fs.qw.mapper.QwGroupMsgItemMapper;
import com.fs.qw.service.IQwGroupMsgItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 客户群发消息的附件记录Service业务层处理
 *
 * @author fs
 * @date 2024-06-28
 */
@Service
public class QwGroupMsgItemServiceImpl implements IQwGroupMsgItemService
{
    @Autowired
    private QwGroupMsgItemMapper qwGroupMsgItemMapper;

    /**
     * 查询客户群发消息的附件记录
     *
     * @param id 客户群发消息的附件记录主键
     * @return 客户群发消息的附件记录
     */
    @Override
    public QwGroupMsgItem selectQwGroupMsgItemById(Long id)
    {
        return qwGroupMsgItemMapper.selectQwGroupMsgItemById(id);
    }

    /**
     * 查询客户群发消息的附件记录列表
     *
     * @param qwGroupMsgItem 客户群发消息的附件记录
     * @return 客户群发消息的附件记录
     */
    @Override
    public List<QwGroupMsgItem> selectQwGroupMsgItemList(QwGroupMsgItem qwGroupMsgItem)
    {
        return qwGroupMsgItemMapper.selectQwGroupMsgItemList(qwGroupMsgItem);
    }

    /**
     * 新增客户群发消息的附件记录
     *
     * @param qwGroupMsgItem 客户群发消息的附件记录
     * @return 结果
     */
    @Override
    public int insertQwGroupMsgItem(QwGroupMsgItem qwGroupMsgItem)
    {
        qwGroupMsgItem.setCreateTime(DateUtils.getNowDate());
        return qwGroupMsgItemMapper.insertQwGroupMsgItem(qwGroupMsgItem);
    }

    /**
     * 修改客户群发消息的附件记录
     *
     * @param qwGroupMsgItem 客户群发消息的附件记录
     * @return 结果
     */
    @Override
    public int updateQwGroupMsgItem(QwGroupMsgItem qwGroupMsgItem)
    {
        qwGroupMsgItem.setUpdateTime(DateUtils.getNowDate());
        return qwGroupMsgItemMapper.updateQwGroupMsgItem(qwGroupMsgItem);
    }

    /**
     * 批量删除客户群发消息的附件记录
     *
     * @param ids 需要删除的客户群发消息的附件记录主键
     * @return 结果
     */
    @Override
    public int deleteQwGroupMsgItemByIds(Long[] ids)
    {
        return qwGroupMsgItemMapper.deleteQwGroupMsgItemByIds(ids);
    }

    /**
     * 删除客户群发消息的附件记录信息
     *
     * @param id 客户群发消息的附件记录主键
     * @return 结果
     */
    @Override
    public int deleteQwGroupMsgItemById(Long id)
    {
        return qwGroupMsgItemMapper.deleteQwGroupMsgItemById(id);
    }
}
