package org.dromara.payment.operator.service;

import org.dromara.payment.channel.domain.bo.BusChannelCashoutBo;
import org.dromara.payment.common.domain.TranLog;
import org.dromara.payment.common.domain.vo.TranLogVo;
import org.dromara.payment.operator.domain.BusOperatorCashout;
import org.dromara.payment.operator.domain.vo.BusOperatorCashoutVo;
import org.dromara.payment.operator.domain.bo.BusOperatorCashoutBo;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.settlement.api.domain.TransactionLog;

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

/**
 * 运营商提现记录Service接口
 *
 * @author LionLi
 * @date 2024-03-28
 */
public interface IBusOperatorCashoutService {

    /**
     * 查询运营商提现记录
     */
    BusOperatorCashoutVo queryById(Long id);

    /**
     * 查询运营商提现记录列表
     */
    TableDataInfo<BusOperatorCashoutVo> queryPageList(BusOperatorCashoutBo bo, PageQuery pageQuery);

    /**
     * 查询运营商提现记录列表
     */
    List<BusOperatorCashoutVo> queryList(BusOperatorCashoutBo bo);

    /**
     * 新增运营商提现记录
     */
    Boolean insertByBo(BusOperatorCashoutBo bo);

    /**
     * 审批运营商提现记录
     * @param bo
     * @return
     */
    Boolean verifyCashout(BusOperatorCashoutBo bo);

    /**
     * 修改运营商提现记录
     */
    Boolean updateByBo(BusOperatorCashoutBo bo);

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

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