package com.fs.qw.service.impl;

import com.fs.common.utils.DateUtils;
import com.fs.qw.domain.FsAppContactWay;
import com.fs.qw.mapper.FsAppContactWayMapper;
import com.fs.qw.service.IFsAppContactWayService;
import com.fs.qw.vo.FsAppContactWayListVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * app客服活码上架Service业务层处理
 *
 * @author fs
 * @date 2024-12-02
 */
@Service
public class FsAppContactWayServiceImpl implements IFsAppContactWayService
{
    @Autowired
    private FsAppContactWayMapper fsAppContactWayMapper;

    /**
     * 查询app客服活码上架
     *
     * @param id app客服活码上架主键
     * @return app客服活码上架
     */
    @Override
    public FsAppContactWay selectFsAppContactWayById(Long id)
    {
        return fsAppContactWayMapper.selectFsAppContactWayById(id);
    }

    /**
     * 查询app客服活码上架列表
     *
     * @param fsAppContactWay app客服活码上架
     * @return app客服活码上架
     */
    @Override
    public List<FsAppContactWay> selectFsAppContactWayList(FsAppContactWay fsAppContactWay)
    {
        return fsAppContactWayMapper.selectFsAppContactWayList(fsAppContactWay);
    }

    /**
     * 新增app客服活码上架
     *
     * @param fsAppContactWay app客服活码上架
     * @return 结果
     */
    @Override
    public int insertFsAppContactWay(FsAppContactWay fsAppContactWay)
    {
        fsAppContactWay.setCreateTime(DateUtils.getNowDate());
        return fsAppContactWayMapper.insertFsAppContactWay(fsAppContactWay);
    }

    /**
     * 修改app客服活码上架
     *
     * @param fsAppContactWay app客服活码上架
     * @return 结果
     */
    @Override
    public int updateFsAppContactWay(FsAppContactWay fsAppContactWay)
    {
        fsAppContactWay.setUpdateTime(DateUtils.getNowDate());
        return fsAppContactWayMapper.updateFsAppContactWay(fsAppContactWay);
    }

    /**
     * 批量删除app客服活码上架
     *
     * @param ids 需要删除的app客服活码上架主键
     * @return 结果
     */
    @Override
    public int deleteFsAppContactWayByIds(Long[] ids)
    {
        return fsAppContactWayMapper.deleteFsAppContactWayByIds(ids);
    }

    /**
     * 删除app客服活码上架信息
     *
     * @param id app客服活码上架主键
     * @return 结果
     */
    @Override
    public int deleteFsAppContactWayById(Long id)
    {
        return fsAppContactWayMapper.deleteFsAppContactWayById(id);
    }


    @Override
    public List<FsAppContactWayListVO> selectFsAppContactWayListVO(FsAppContactWay fsAppContactWay) {
        return fsAppContactWayMapper.selectFsAppContactWayListVO(fsAppContactWay);
    }

    @Override
    public FsAppContactWay selectContactWayRandom() {
        return fsAppContactWayMapper.selectContactWayRandom();
    }
}
