package com.ssj.service.sys.teacher;

import com.ssj.bean.sys.teacher.domain.OnlineTeacherWeight;
import com.ssj.bean.weixin.libmy.domain.TbLibManager;
import com.ssj.framework.core.common.service.BaseService;

/**
 * @author yrf
 * @date 2019/5/9 10:40
 */
public interface OnlineTeacherWeightService extends BaseService<OnlineTeacherWeight, String> {

    /**
     * 计算并保存所有老师的新权重
     */
    long computeAndSaveWeight();

    /**
     * 更新选定批改老师的实时权重和批改图片总数
     * @param vipId 学生id
     * @param correctTeacher 批改老师记录
     * @param pictureSum 需要增加的图片数量，若是减少则为负值
     */
    void updateRealTimeWeightAndHomeworkSum(String vipId, TbLibManager correctTeacher, int pictureSum);

    /**
     * 根据老师id、学校、年级查询分配权重
     * @param teacherId 老师id
     * @param school 学校
     * @param grade 年级
     */
    OnlineTeacherWeight findTopByTeacherIdAndSchoolNameAndGrade(String teacherId, String school, String grade);
}
