package com.fs.qw.service.impl;

import com.fs.common.utils.DateUtils;
import com.fs.qw.domain.QwContactWayGroup;
import com.fs.qw.mapper.QwContactWayGroupMapper;
import com.fs.qw.service.IQwContactWayGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 联系我分组Service业务层处理
 * 
 * @author fs
 * @date 2024-07-19
 */
@Service
public class QwContactWayGroupServiceImpl implements IQwContactWayGroupService 
{
    @Autowired
    private QwContactWayGroupMapper qwContactWayGroupMapper;

    /**
     * 查询联系我分组
     * 
     * @param id 联系我分组主键
     * @return 联系我分组
     */
    @Override
    public QwContactWayGroup selectQwContactWayGroupById(Long id)
    {
        return qwContactWayGroupMapper.selectQwContactWayGroupById(id);
    }

    /**
     * 查询联系我分组列表
     * 
     * @param qwContactWayGroup 联系我分组
     * @return 联系我分组
     */
    @Override
    public List<QwContactWayGroup> selectQwContactWayGroupList(QwContactWayGroup qwContactWayGroup)
    {
        return qwContactWayGroupMapper.selectQwContactWayGroupList(qwContactWayGroup);
    }

    /**
     * 新增联系我分组
     * 
     * @param qwContactWayGroup 联系我分组
     * @return 结果
     */
    @Override
    public int insertQwContactWayGroup(QwContactWayGroup qwContactWayGroup)
    {
        qwContactWayGroup.setCreateTime(DateUtils.getNowDate());
        return qwContactWayGroupMapper.insertQwContactWayGroup(qwContactWayGroup);
    }

    /**
     * 修改联系我分组
     * 
     * @param qwContactWayGroup 联系我分组
     * @return 结果
     */
    @Override
    public int updateQwContactWayGroup(QwContactWayGroup qwContactWayGroup)
    {
        return qwContactWayGroupMapper.updateQwContactWayGroup(qwContactWayGroup);
    }

    /**
     * 批量删除联系我分组
     * 
     * @param ids 需要删除的联系我分组主键
     * @return 结果
     */
    @Override
    public int deleteQwContactWayGroupByIds(Long[] ids)
    {
        return qwContactWayGroupMapper.deleteQwContactWayGroupByIds(ids);
    }

    /**
     * 删除联系我分组信息
     * 
     * @param id 联系我分组主键
     * @return 结果
     */
    @Override
    public int deleteQwContactWayGroupById(Long id)
    {
        return qwContactWayGroupMapper.deleteQwContactWayGroupById(id);
    }
}
