package com.hfkj.service.agent;

import com.hfkj.entity.BsAgentApiAccount;
import com.hfkj.entity.BsOrderRefund;

import java.math.BigDecimal;
import java.util.Map;

/**
 * @className: BsAgentApiAccountService
 * @author: HuRui
 * @date: 2024/8/28
 **/
public interface BsAgentApiAccountService {

    /**
     * 创建账户
     * @param agentId
     */
    void create(Long agentId);

    /**
     * 修改账户
     * @param data
     */
    void update(BsAgentApiAccount data);

    /**
     * 查询账户
     * @param agentId
     * @return
     */
    BsAgentApiAccount getAccount(Long agentId);

    /**
     * 充值
     * @param agentId   代理商id
     * @param amount    金额
     */
    void recharge(Long agentId, BigDecimal amount) throws Exception;

    /**
     * 扣除
     * @param agentId        代理商id
     * @param amount         金额
     * @param otherParam     其他参数
     */
    void consume(Long agentId, BigDecimal amount, Map<String, Object> otherParam) throws Exception;

    /**
     * 退款
     * @param agentId
     * @param amount
     * @param orderRefund
     */
    void refund(Long agentId, BigDecimal amount, BsOrderRefund orderRefund) throws Exception;


}
