package com.ssj.service.sys.give;

import com.ssj.bean.sys.give.GiveRecord;
import com.ssj.framework.core.common.service.BaseService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * @author Mount Liu
 * @date 2019/5/9
 */
public interface GiveRecordService extends BaseService<GiveRecord, String> {

    /**
     * 分页查询列表
     *
     * @param params
     * @param sp
     * @return
     */
    Page<GiveRecord> findByPage(Map<String, Object> params, Pageable sp);

    /**
     * 查找会员赠送记录
     *
     * @param vipId
     * @return
     */
    GiveRecord findByVipId(String vipId);

    /**
     * 查找延长或缩减记录
     * @param vacationLimitId
     * @param vipId
     * @param giveWay
     * @return
     */
    List<GiveRecord> findValidGiveRecord(String vacationLimitId, String vipId, int giveWay, String vipServiceId);

}
