package com.ym.mec.biz.dal.dao;

import com.ym.mec.biz.dal.entity.TeacherSalaryComplaints;
import com.ym.mec.biz.dal.enums.TeacherSalaryComplaintsStatusEnum;
import com.ym.mec.common.dal.BaseDAO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TeacherSalaryComplaintsDao extends BaseDAO<Long, TeacherSalaryComplaints> {

    /**
     * 获取课酬申述
     * @param settlementMonth
     * @param teacherId
     * @param statusEnum
     * @return
     */
    TeacherSalaryComplaints findByMonthAndTeacherId(@Param("settlementMonth") String settlementMonth, @Param("teacherId") Integer teacherId, @Param("statusEnum") TeacherSalaryComplaintsStatusEnum statusEnum);

    /**
     * 撤销申述
     * @param salarySettlementMonth
     * @param teacherId
     * @return
     */
    Integer repealComplaints(@Param("salarySettlementMonth") String salarySettlementMonth, @Param("teacherId") Integer teacherId);

    /**
     * @describe 获取教师指定月份的申诉记录
     * @author Joburgess
     * @date 2020/4/16
     * @param teacherId:
     * @param month:
     * @return java.util.List<com.ym.mec.biz.dal.entity.TeacherSalaryComplaints>
     */
    List<TeacherSalaryComplaints> findTeacherSalaryComplaintsWithMonth(@Param("teacherId") Integer teacherId,
                                                                       @Param("month") String month,
                                                                        @Param("status") TeacherSalaryComplaintsStatusEnum status);

    /**
     * @describe 根据月份更新未处理的申诉至已结束
     * @author Joburgess
     * @date 2020/4/18
     * @param month:
     * @return int
     */
    int updateComplaintStatusTuDoneWithMonth(@Param("month") String month);

}
