package com.ssj.service.weixin.order.service;


import com.ssj.bean.kmt.kmt.domain.KmtCourse;
import com.ssj.bean.weixin.order.domain.LessonServiceSales;
import com.ssj.framework.core.common.service.BaseService;

import java.util.Date;

public interface LessonServiceSalesService extends BaseService<LessonServiceSales, String>{

	
	/**
	 * 根据课程id计算生成分成数据，插入一条数据
	 * courseId查询course,is_finish=1
	 * courseId唯一
	 * @param courseId
	 * @return
	 */
	boolean saveLessonServiceSalesByCourse(String courseId);
	
	
	/**
	 * 定时任务调用
	 * 根据startTime与endTime查询统计分成数据,并且插入pay_business_to_user表数据，更新pay_business_id字段
	 * @param startTime 开始时间
	 * @param startTime 结束时间
	 * @return
	 */
	boolean countLessonServiceSalesByTime(Date startTime,Date endTime );


    void saveLessonServiceSalesByCourseSharedLib(KmtCourse course);

    void computeSalesOfLibAndFirm(Date startTime, Date endTime);
}
