package com.ym.mec.biz.service;

import com.ym.mec.biz.dal.entity.Organization;
import com.ym.mec.biz.dal.entity.SporadicChargeInfo;
import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
import com.ym.mec.biz.dal.page.SporadicChargeInfoQueryInfo;
import com.ym.mec.common.page.PageInfo;
import com.ym.mec.common.service.BaseService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SporadicChargeInfoService extends BaseService<Integer, SporadicChargeInfo> {

    /**
     * 零星支付订单
     *
     * @param order
     */
    Boolean renewForCallback(StudentPaymentOrder order) throws Exception;

    /**
     * 分页查询
     *
     * @param queryInfo
     * @return
     */
    PageInfo<SporadicChargeInfo> queryDetailPage(SporadicChargeInfoQueryInfo queryInfo);

    /**
     * 单查询
     *
     * @param id
     * @return
     */
    SporadicChargeInfo getDetail(Integer id);

    SporadicChargeInfo findByOrganIdAndType(Integer organId, Integer type);

    /**
     * 开启/关闭缴费
     *
     * @param sporadicId
     * @param openFlag
     */
    void updateOpenFlag(Integer sporadicId, Integer openFlag);

    /**
     * 删除
     *
     * @param id
     */
    void del(Integer id);

    /**
     * @param id:
     * @return com.ym.mec.biz.dal.entity.SporadicChargeInfo
     * @describe 获取详情
     * @apiNote 时光荏苒，认真工作的时间总是过得很快，而我、享受这一刻！
     * @author zouxuan
     * @date 2020/9/10
     * @time 15:20
     */
    SporadicChargeInfo findDetail(Integer id, Integer userId);

    /**
     * 获取分部活动信息
     *
     * @param organId
     * @param type
     * @return
     */
    List<SporadicChargeInfo> getOrganActiveInfo(Integer organId, Integer type);
}