package com.cf.imes.module.system.service.funds.organamount;


import com.cf.imes.module.system.controller.admin.funds.organamount.vo.AllOrganAmountRespVO;
import com.cf.imes.module.system.controller.admin.funds.organamount.vo.OrganAmountRespVO;
import com.cf.imes.module.system.controller.admin.funds.organamount.vo.OrganRechargeAmountRespVO;
import com.cf.imes.module.system.dal.dataobject.funds.organamount.OrganAmountDO;

import java.math.BigDecimal;

/**
 * @author 资金管理接口
 */
public interface OrganAmountService {

    /**
     * 校验机构套餐
     *
     * @param organId
     */
    OrganAmountDO validOrganAmount(Long organId);

    /**
     * 机构充值
     *
     * @param organId
     * @param amount  充值金额
     * @param gift    赠送金额
     * @return
     */
    OrganRechargeAmountRespVO recharge(Long organId, BigDecimal amount, BigDecimal gift);

    /**
     * 组织购买产品
     *
     * @param organAmountDO
     * @return
     */
    void productPay(OrganAmountDO organAmountDO);

    /**
     * 产品外部支付失败更新余额/赠送金
     *
     * @param organId
     * @param balance
     * @param gift
     */
    OrganRechargeAmountRespVO refundProductOrganAmountBalanceAndGift(Long organId, BigDecimal balance, BigDecimal gift);

    OrganAmountRespVO getOrganAmount(Long organId);


    AllOrganAmountRespVO getOrganAmountAll();

}
