package com.ym.mec.biz.service;

import com.ym.mec.biz.dal.entity.MemberFeeSetting;
import com.ym.mec.biz.dal.enums.PeriodEnum;
import com.ym.mec.common.service.BaseService;

import java.math.BigDecimal;
import java.util.function.BiFunction;

public interface MemberFeeSettingService extends BaseService<Integer, MemberFeeSetting> {

    MemberFeeSetting findByRankIdAndOrganId(Integer organId, Integer rankId);

    /**
    * @description: 获取价格（原价或者现价）
     * @param organId
     * @param memberRankSettingId
     * @param period
     * @param num
     * @param func
    * @return java.math.BigDecimal
    * @author zx
    * @date 2022/1/14 16:11
    */
    BigDecimal getAmount(Integer organId, Integer memberRankSettingId, PeriodEnum period, BigDecimal num,
                         BiFunction<PeriodEnum,MemberFeeSetting,BigDecimal> func);
}