package com.ym.mec.collectfee.service;

import com.ym.mec.collectfee.common.service.BaseService;
import com.ym.mec.collectfee.entity.Account;
import com.ym.mec.collectfee.entity.Order;

import java.math.BigDecimal;

public interface AccountService extends BaseService<Integer, Account> {

    /**
     * 根据分部id获取收款账户信息
     *
     * @param branchId 分部id
     * @return
     */
    Account getAccountByBranchId(Integer branchId,BigDecimal money);

    /**
     * 根据id和version更新已收款
     *
     * @param account
     * @return
     */
    int upByIdAndVersion(Account account);

    /**
     * 获取分佣账户
     *
     * @param accountId 默认收款账户
     * @return
     */
    Account getRoutingAccount(int accountId, BigDecimal money);

}