package com.hzs.member.account;

import com.hzs.common.core.domain.R;
import com.hzs.common.domain.member.account.CuMemberTrade;
import com.hzs.member.account.dto.BusinessCommissionDTO;
import com.hzs.member.account.dto.MemberBalanceDTO;

import java.util.List;

/**
 * 会员端在线支付 回调插入交易流水、更新余额
 */
public interface IMemberTradeServiceApi {

    /**
     * 查询余额不足的用户信息
     *
     * @param businessCommissionDTO 业务参数
     * @return List<MemberBalanceDTO>
     */
    List<MemberBalanceDTO> selectBalanceNotEnoughMember(BusinessCommissionDTO businessCommissionDTO);

    /**
     * 业务办理扣费提交
     *
     * @param businessCommissionDTO 业务办理入参
     * @return Integer
     */
    R<Boolean> businessCommissionSubmit(BusinessCommissionDTO businessCommissionDTO);

    /**
     * 查询会员订单产生的最新交易明细
     *
     * @param pkMember      会员
     * @param sourceCode    来源单号
     * @param tradeClassify 交易分类
     * @return
     */
    R<List<CuMemberTrade>> querySourceCodeLastTrade(Long pkMember, String sourceCode, Integer tradeClassify);

}
