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;

/**
 * 短链课程看课记录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);

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

    /**
     * 查询红包数量
     * @param companyUserId 销售ID
     * @return count
     */
    int getCountByCompanyUserIdId(Long companyUserId);

    /**
     * 查询新用户红包金额总和
     * @param companyUserId 销售ID
     * @return amount
     */
    BigDecimal getNewVipRedPackAmountByCompanyUserIdId(Long companyUserId);

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