package com.hfkj.service.merchant;

import com.hfkj.entity.BsMerchantChainBrandAccount;
import com.hfkj.entity.BsOrderRefund;

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

/**
 * @className: BsMerchantChainBrandAccountService
 * @author: HuRui
 * @date: 2024/8/14
 **/
public interface BsMerchantChainBrandAccountService {

    /**
     * 编辑数据
     * @param data
     */
    void editData(BsMerchantChainBrandAccount data);

    /**
     * 查询账户
     * @param chainBrandId 连锁品牌id
     * @return
     */
    BsMerchantChainBrandAccount getAccount(Long chainBrandId);

    /**
     * 充值
     * @param chainBrandId    连锁品牌id
     * @param amount            金额
     */
    void recharge(Long chainBrandId, BigDecimal amount) throws Exception;

    /**
     * 扣除
     * @param chainBrandId    连锁品牌id
     * @param merNo           商户
     * @param amount          金额
     * @param otherParam     其他参数
     */
    void consume(Long chainBrandId,String merNo, BigDecimal amount, Map<String, Object> otherParam) throws Exception;

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

}
