package com.fs.company.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fs.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.company.mapper.CompanyWxChatMapper;
import com.fs.company.domain.CompanyWxChat;
import com.fs.company.service.ICompanyWxChatService;

/**
 * 个微聊天Service业务层处理
 * 
 * @author fs
 * @date 2025-01-15
 */
@Service
public class CompanyWxChatServiceImpl extends ServiceImpl<CompanyWxChatMapper, CompanyWxChat> implements ICompanyWxChatService
{
    @Autowired
    private CompanyWxChatMapper companyWxChatMapper;

    /**
     * 查询个微聊天
     * 
     * @param id 个微聊天主键
     * @return 个微聊天
     */
    @Override
    public CompanyWxChat selectCompanyWxChatById(Long id)
    {
        return companyWxChatMapper.selectCompanyWxChatById(id);
    }

    /**
     * 查询个微聊天列表
     * 
     * @param companyWxChat 个微聊天
     * @return 个微聊天
     */
    @Override
    public List<CompanyWxChat> selectCompanyWxChatList(CompanyWxChat companyWxChat)
    {
        return companyWxChatMapper.selectCompanyWxChatList(companyWxChat);
    }

    /**
     * 新增个微聊天
     * 
     * @param companyWxChat 个微聊天
     * @return 结果
     */
    @Override
    public int insertCompanyWxChat(CompanyWxChat companyWxChat)
    {
        companyWxChat.setCreateTime(DateUtils.getNowDate());
        return companyWxChatMapper.insertCompanyWxChat(companyWxChat);
    }

    /**
     * 修改个微聊天
     * 
     * @param companyWxChat 个微聊天
     * @return 结果
     */
    @Override
    public int updateCompanyWxChat(CompanyWxChat companyWxChat)
    {
        companyWxChat.setUpdateTime(DateUtils.getNowDate());
        return companyWxChatMapper.updateCompanyWxChat(companyWxChat);
    }

    /**
     * 批量删除个微聊天
     * 
     * @param ids 需要删除的个微聊天主键
     * @return 结果
     */
    @Override
    public int deleteCompanyWxChatByIds(Long[] ids)
    {
        return companyWxChatMapper.deleteCompanyWxChatByIds(ids);
    }

    /**
     * 删除个微聊天信息
     * 
     * @param id 个微聊天主键
     * @return 结果
     */
    @Override
    public int deleteCompanyWxChatById(Long id)
    {
        return companyWxChatMapper.deleteCompanyWxChatById(id);
    }
}
