package com.fs.qw.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fs.common.utils.DateUtils;
import com.fs.qw.domain.QwWorkLinkUser;
import com.fs.qw.mapper.QwWorkLinkUserMapper;
import com.fs.qw.service.IQwWorkLinkUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 企微获客链接用户关联Service业务层处理
 *
 * @author fs
 * @date 2025-01-10
 */
@Service
public class QwWorkLinkUserServiceImpl extends ServiceImpl<QwWorkLinkUserMapper, QwWorkLinkUser> implements IQwWorkLinkUserService
{
    @Autowired
    private QwWorkLinkUserMapper qwWorkLinkUserMapper;

    /**
     * 查询企微获客链接用户关联
     *
     * @param id 企微获客链接用户关联主键
     * @return 企微获客链接用户关联
     */
    @Override
    public QwWorkLinkUser selectQwWorkLinkUserById(Long id)
    {
        return qwWorkLinkUserMapper.selectQwWorkLinkUserById(id);
    }

    /**
     * 查询企微获客链接用户关联列表
     *
     * @param qwWorkLinkUser 企微获客链接用户关联
     * @return 企微获客链接用户关联
     */
    @Override
    public List<QwWorkLinkUser> selectQwWorkLinkUserList(QwWorkLinkUser qwWorkLinkUser)
    {
        return qwWorkLinkUserMapper.selectQwWorkLinkUserList(qwWorkLinkUser);
    }

    /**
     * 新增企微获客链接用户关联
     *
     * @param qwWorkLinkUser 企微获客链接用户关联
     * @return 结果
     */
    @Override
    public int insertQwWorkLinkUser(QwWorkLinkUser qwWorkLinkUser)
    {
        qwWorkLinkUser.setCreateTime(DateUtils.getNowDate());
        return qwWorkLinkUserMapper.insertQwWorkLinkUser(qwWorkLinkUser);
    }

    /**
     * 修改企微获客链接用户关联
     *
     * @param qwWorkLinkUser 企微获客链接用户关联
     * @return 结果
     */
    @Override
    public int updateQwWorkLinkUser(QwWorkLinkUser qwWorkLinkUser)
    {
        qwWorkLinkUser.setUpdateTime(DateUtils.getNowDate());
        return qwWorkLinkUserMapper.updateQwWorkLinkUser(qwWorkLinkUser);
    }

    /**
     * 批量删除企微获客链接用户关联
     *
     * @param ids 需要删除的企微获客链接用户关联主键
     * @return 结果
     */
    @Override
    public int deleteQwWorkLinkUserByIds(Long[] ids)
    {
        return qwWorkLinkUserMapper.deleteQwWorkLinkUserByIds(ids);
    }

    /**
     * 删除企微获客链接用户关联信息
     *
     * @param id 企微获客链接用户关联主键
     * @return 结果
     */
    @Override
    public int deleteQwWorkLinkUserById(Long id)
    {
        return qwWorkLinkUserMapper.deleteQwWorkLinkUserById(id);
    }
}
