package com.fs.course.service;

import java.math.BigDecimal;
import java.util.List;

import com.fs.common.core.domain.R;
import com.fs.course.domain.FsCourseRedPacketLog;
import com.fs.course.param.FsCourseRedPacketLogParam;
import com.fs.course.vo.FsCourseRedPacketLogListPVO;
import com.fs.course.vo.FsCourseRedPacketLogListVO;
import com.fs.his.vo.OptionsVO;

/**
 * 短链课程看课记录Service接口
 *
 * @author fs
 * @date 2024-10-24
 */
public interface IFsCourseRedPacketLogService
{
    /**
     * 查询短链课程看课记录
     *
     * @param logId 短链课程看课记录主键
     * @return 短链课程看课记录
     */
    public FsCourseRedPacketLog selectFsCourseRedPacketLogByLogId(Long logId);

    /**
     * 查询短链课程看课记录列表
     *
     * @param fsCourseRedPacketLog 短链课程看课记录
     * @return 短链课程看课记录集合
     */
    public List<FsCourseRedPacketLog> selectFsCourseRedPacketLogList(FsCourseRedPacketLog fsCourseRedPacketLog);

    /**
     * 新增短链课程看课记录
     *
     * @param fsCourseRedPacketLog 短链课程看课记录
     * @return 结果
     */
    public int insertFsCourseRedPacketLog(FsCourseRedPacketLog fsCourseRedPacketLog);

    /**
     * 修改短链课程看课记录
     *
     * @param fsCourseRedPacketLog 短链课程看课记录
     * @return 结果
     */
    public int updateFsCourseRedPacketLog(FsCourseRedPacketLog fsCourseRedPacketLog);

    /**
     * 批量删除短链课程看课记录
     *
     * @param logIds 需要删除的短链课程看课记录主键集合
     * @return 结果
     */
    public int deleteFsCourseRedPacketLogByLogIds(Long[] logIds);

    /**
     * 删除短链课程看课记录信息
     *
     * @param logId 短链课程看课记录主键
     * @return 结果
     */
    public int deleteFsCourseRedPacketLogByLogId(Long logId);

//    R syncRedPacket(String outBatchNo);

    R syncRedPacket(String outBatchNo, String batchId);

    List<FsCourseRedPacketLogListPVO> selectFsCourseRedPacketLogListVO(FsCourseRedPacketLogParam fsCourseRedPacketLog);
    List<FsCourseRedPacketLogListPVO> selectFsCourseRedPacketLogListVONew(FsCourseRedPacketLogParam fsCourseRedPacketLog);
    List<FsCourseRedPacketLogListVO> selectFsCourseRedPacketLogListCountVO(FsCourseRedPacketLogParam fsCourseRedPacketLog);

    /**
     * 查询红包金额数
     * @param companyUserId 销售ID
     * @return amount
     */
    BigDecimal getSumByCompanyUserIdId(Long companyUserId);

    int getCountByCompanyUserIdId(Long userId);

    BigDecimal getNewVipRedPackAmountByCompanyUserIdId(Long userId);

    R retryCourseRedPacketLog(Long[] logIds);

    void sendRedPacketBf();

    void queryRedPacketResult(String startTime, String endTime);

    /**
     * 根据课程ID和营期名称模糊查询营期列表
     *
     * @param periodName 营期名称
     * @param courseId 课程ID
     * @param companyId 企业ID
     * @return 营期列表
     */
    List<OptionsVO> getPeriodListLikeName(String periodName, Long courseId, Long companyId);

    R getBillsByTransferBillNo(String batchId);

    List<FsCourseRedPacketLogListPVO> getReadPackageTotal(FsCourseRedPacketLog fsCourseRedPacketLog);
}
