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.QwCourseFinishRemarkRty;
import com.fs.qw.mapper.QwCourseFinishRemarkRtyMapper;
import com.fs.qw.service.IQwCourseFinishRemarkRtyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 企业微信完课打备注失败重试Service业务层处理
 *
 * @author fs
 * @date 2025-07-23
 */
@Service
public class QwCourseFinishRemarkRtyServiceImpl extends ServiceImpl<QwCourseFinishRemarkRtyMapper, QwCourseFinishRemarkRty> implements IQwCourseFinishRemarkRtyService {


    @Autowired
    private QwCourseFinishRemarkRtyMapper finishRemarkRtyMapper;

    /**
     * 查询企业微信完课打备注失败重试
     *
     * @param id 企业微信完课打备注失败重试主键
     * @return 企业微信完课打备注失败重试
     */
    @Override
    public QwCourseFinishRemarkRty selectQwCourseFinishRemarkRtyById(Long id)
    {
        return baseMapper.selectQwCourseFinishRemarkRtyById(id);
    }

    /**
     * 查询企业微信完课打备注失败重试列表
     *
     * @param qwCourseFinishRemarkRty 企业微信完课打备注失败重试
     * @return 企业微信完课打备注失败重试
     */
    @Override
    public List<QwCourseFinishRemarkRty> selectQwCourseFinishRemarkRtyList(QwCourseFinishRemarkRty qwCourseFinishRemarkRty)
    {
        return baseMapper.selectQwCourseFinishRemarkRtyList(qwCourseFinishRemarkRty);
    }

    @Override
    public List<QwCourseFinishRemarkRty> selectQwCourseFinishRemarkRtyListByTime(LocalDateTime tenMinutesBefore, Integer num) {
        return finishRemarkRtyMapper.selectQwCourseFinishRemarkRtyListByTime(tenMinutesBefore,num);
    }

    @Override
    public List<Long> selectQwCourseFinishRemarkRtyListByOutTime() {
        return finishRemarkRtyMapper.selectQwCourseFinishRemarkRtyListByOutTime();
    }


    /**
     * 新增企业微信完课打备注失败重试
     *
     * @param qwCourseFinishRemarkRty 企业微信完课打备注失败重试
     * @return 结果
     */
    @Override
    public int insertQwCourseFinishRemarkRty(QwCourseFinishRemarkRty qwCourseFinishRemarkRty)
    {
        qwCourseFinishRemarkRty.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertQwCourseFinishRemarkRty(qwCourseFinishRemarkRty);
    }

    /**
     * 修改企业微信完课打备注失败重试
     *
     * @param qwCourseFinishRemarkRty 企业微信完课打备注失败重试
     * @return 结果
     */
    @Override
    public int updateQwCourseFinishRemarkRty(QwCourseFinishRemarkRty qwCourseFinishRemarkRty)
    {
        return baseMapper.updateQwCourseFinishRemarkRty(qwCourseFinishRemarkRty);
    }

    /**
     * 批量删除企业微信完课打备注失败重试
     *
     * @param ids 需要删除的企业微信完课打备注失败重试主键
     * @return 结果
     */
    @Override
    public int deleteQwCourseFinishRemarkRtyByIds(Long[] ids)
    {
        return baseMapper.deleteQwCourseFinishRemarkRtyByIds(ids);
    }

    /**
     * 删除企业微信完课打备注失败重试信息
     *
     * @param id 企业微信完课打备注失败重试主键
     * @return 结果
     */
    @Override
    public int deleteQwCourseFinishRemarkRtyById(Long id)
    {
        return baseMapper.deleteQwCourseFinishRemarkRtyById(id);
    }

    @Override
    public void insertOrUpdateQwCourseFinishRemarkRty(QwCourseFinishRemarkRty remarkRty) {
        finishRemarkRtyMapper.insertOrUpdateQwCourseFinishRemarkRty(remarkRty);
    }

}
