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

import java.util.List;

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

public interface ChargeTypeSubjectMapperDao extends BaseDAO<Long, ChargeTypeSubjectMapper> {

    /**
     * 删除当前收费类型关联的科目
     */
    void deleteByChargeTypeId(Integer chargeTypeId);

    int batchInsert(List<ChargeTypeSubjectMapper> chargeTypeSubjectMapperList);

    int batchUpdate(List<ChargeTypeSubjectMapper> chargeTypeSubjectMapperList);

    /**
     * 根据收费类型获取声部的折扣
     *
     * @param chargeTypeId
     * @param subjectId
     * @return
     */
    ChargeTypeSubjectMapper getSubjectDiscount(@Param("chargeTypeId") Integer chargeTypeId, @Param("subjectId") Integer subjectId);

    ChargeTypeSubjectMapper getSubjectsDiscount(@Param("chargeTypeId") Integer chargeTypeId, @Param("subjectIds") String subjectIds);
}
