package org.dromara.payment.channel.service;

import org.dromara.payment.channel.domain.BusChannelCashout;
import org.dromara.payment.channel.domain.vo.BusChannelCashoutVo;
import org.dromara.payment.channel.domain.bo.BusChannelCashoutBo;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.payment.common.domain.TranLog;
import org.dromara.payment.common.domain.vo.TranLogVo;
import org.dromara.settlement.api.domain.TransactionLog;

import java.util.Collection;
import java.util.List;

/**
 * 代理商提现记录Service接口
 *
 * @author LionLi
 * @date 2024-04-10
 */
public interface IBusChannelCashoutService {

    /**
     * 查询代理商提现记录
     */
    BusChannelCashoutVo queryById(Long id);

    /**
     * 查询代理商提现记录列表
     */
    TableDataInfo<BusChannelCashoutVo> queryPageList(BusChannelCashoutBo bo, PageQuery pageQuery);

    /**
     * 查询代理商提现记录列表
     */
    List<BusChannelCashoutVo> queryList(BusChannelCashoutBo bo);

    /**
     * 新增代理商提现记录
     */
    Boolean insertByBo(BusChannelCashoutBo bo);

    /**
     * 修改代理商提现记录
     */
    Boolean updateByBo(BusChannelCashoutBo bo);

    /**
     * 校验并批量删除代理商提现记录信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    /**
     * 代理商提现业务
     * @param tlog 交易记录
     * @param tran 本次交易结果
     * @return
     */
    TranLog cashoutResult(TranLogVo tlog, TransactionLog tran);

    /**
     * 审批代理商提现记录
     * @param bo
     * @return
     */
    Boolean verifyCashout(BusChannelCashoutBo bo);
}
