package com.hfkj.service.rebate;

import com.hfkj.entity.BsRebateMerAccount;
import com.hfkj.service.rebate.model.RebateMerAccountTradeObject;
import com.hfkj.sysenum.RebateMerAccountObjectTypeEnum;
import com.hfkj.sysenum.RebateMerAccountTradeTypeEnum;

import java.math.BigDecimal;

/**
 * @className: BsRebateMerAccountService
 * @author: HuRui
 * @date: 2023/10/10
 **/
public interface BsRebateMerAccountService {

    /**
     * 编辑数据
     * @param merAccount
     */
    void editData(BsRebateMerAccount merAccount);

    /**
     * 收入
     */
    void income(Long accountNumber, BigDecimal tradeAmount, RebateMerAccountTradeObject tradeObject);

    /**
     * 支出
     */
    void expenditure(Long accountNumber, BigDecimal tradeAmount, RebateMerAccountTradeObject tradeObject);

    /**
     * 查询账户
     * @param merId 商户id
     * @return
     */
    BsRebateMerAccount getAccountByMerId(Long merId);

    /**
     * 查询账户
     * @param accountNumber 账户编号
     * @return
     */
    BsRebateMerAccount getAccountByNumber(Long accountNumber);

    /**
     * 冻结账户
     * @param accountNumber 账户编号
     */
    void freeze(Long accountNumber);

    /**
     * 解冻账户
     * @param accountNumber 账户编号
     */
    void unfreeze(Long accountNumber);

}
