package com.muchinfo.mtp3interface.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.muchinfo.mtp3pojos.entity.TradeOrderdetail;
import com.muchinfo.mtp3pojos.entity.Wrfactortypeitem;
import com.muchinfo.mtp3pojos.vo.marketrun.MarketRunCutPositionResult;
import com.muchinfo.mtp3pojos.vo.query.accounttransaction.AccountTransactionQueryParam;
import com.muchinfo.mtp3pojos.vo.query.accounttransaction.AccountTransactionQueryResult;
import com.muchinfo.mtp3pojos.vo.query.commission.*;
import com.muchinfo.mtp3pojos.vo.query.contract.ContractSheetParam;
import com.muchinfo.mtp3pojos.vo.query.contract.ContractSheetResult;
import com.muchinfo.mtp3pojos.vo.query.contract.ContractSheetResultDetail;
import com.muchinfo.mtp3pojos.vo.query.contract.ContractTradeResult;
import com.muchinfo.mtp3pojos.vo.query.deliveryorder.*;
import com.muchinfo.mtp3pojos.vo.query.goodstrade.GoodsTradeQueryParam;
import com.muchinfo.mtp3pojos.vo.query.goodstrade.GoodsTradeQueryResult;
import com.muchinfo.mtp3pojos.vo.query.investorsum.InvestorSumQueryParam;
import com.muchinfo.mtp3pojos.vo.query.investorsum.InvestorSumQueryResult;
import com.muchinfo.mtp3pojos.vo.query.other.*;
import com.muchinfo.mtp3pojos.vo.query.position.*;
import com.muchinfo.mtp3pojos.vo.query.tradesum.TradeSumQueryParam;
import com.muchinfo.mtp3pojos.vo.query.tradesum.TradeSumQueryResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 交易委托单表 - 导历史 Mapper 接口
 * </p>
 *
 * @author XKF
 * @since 2024-07-02
 */
@Mapper
public interface ITradeOrderdetailMapper extends BaseMapper<TradeOrderdetail> {

    IPage<CommissionSheetResult> queryCommissionSheet(IPage<CommissionSheetResult> page, @Param("vo") CommissionSheetParam commissionSheetParam);

    IPage<CommissionSheetResult> queryCoinSheet(IPage<CommissionSheetResult> page, @Param("vo") CommissionSheetParam commissionSheetParam);

    List<CommissionSheetResult> queryCommissionSheet(@Param("vo") CommissionSheetParam commissionSheetParam);

    List<CommissionSheetResult> queryCoinSheet(@Param("vo") CommissionSheetParam commissionSheetParam);

    CommissionSheetResultDetail commissionSheetQueryDetail(@Param("orderId") String orderId, @Param("isHis") Integer isHis, @Param("tradeDate") String tradeDate);

    List<TradeResult> queryTradeTradeDetails(@Param("orderId") String orderId);

    List<TradeHisResult> queryHisTradeList(@Param("orderId") String orderId);

    IPage<ContractSheetResult> queryContractSheet(IPage<ContractSheetResult> page, @Param("vo") ContractSheetParam contractSheetParam);

    List<ContractSheetResult> queryContractSheet(@Param("vo") ContractSheetParam contractSheetParam);

    ContractSheetResultDetail contractSheetQueryDetail(@Param("tradeid") String tradeid, @Param("buyorsell") Integer buyorsell, @Param("ishis") Integer ishis);

    List<ContractTradeResult> queryTradeClose(@Param("tradeid") String tradeid, @Param("buyorsell") Integer buyorsell, @Param("ishis") Integer ishis);

    String selectMemberUserName(@Param("accountid") Long accountid);

    IPage<PositionSheetResult> queryTradeHolderDetailList(IPage<PositionSheetResult> page, @Param("vo") PositionSheetParam param);

    IPage<PositionSheetResult> queryHisTradeHolderDetaileList(IPage<PositionSheetResult> page, @Param("vo") PositionSheetParam param);

    IPage<PositionSheetResult> queryHisTradeHolderDetaileByPage(IPage<PositionSheetResult> page, @Param("vo") PositionSheetParam param);

    List<PositionSheetResult> queryTradeHolderDetailList(@Param("vo") PositionSheetParam param);

    List<PositionSheetResult> queryHisTradeHolderDetaileList(@Param("vo") PositionSheetParam param);

    List<PositionSheetResult> queryHisTradeHolderDetaileByPage(@Param("vo") PositionSheetParam param);

    PositionSheetResultDetail queryTradeHolderDetailById(@Param("ishis") Integer ishis, @Param("tradeid") String tradeid, @Param("buyorsell") Integer buyorsell, @Param("histradedate") String histradedate);

    IPage<PositionSumSheetResult> queryTradePositionPage(IPage<PositionSumSheetResult> page, @Param("vo") PositionSumSheetParam param);

    List<PositionSumSheetResult> queryTradePositionPage(@Param("vo") PositionSumSheetParam param);

    IPage<AccountTransactionQueryResult> queryByAccount(IPage<AccountTransactionQueryResult> page, @Param("vo") AccountTransactionQueryParam param);

    IPage<AccountTransactionQueryResult> queryByAccountDate(IPage<AccountTransactionQueryResult> page, @Param("vo") AccountTransactionQueryParam param);

    List<AccountTransactionQueryResult> queryByAccount(@Param("vo") AccountTransactionQueryParam param);

    List<AccountTransactionQueryResult> queryByAccountDate(@Param("vo") AccountTransactionQueryParam param);

    IPage<InvestorSumQueryResult> queryInvestorSumList(IPage<InvestorSumQueryResult> page, @Param("vo") InvestorSumQueryParam param);

    IPage<GoodsTradeQueryResult> queryByAGoods(IPage<GoodsTradeQueryResult> page, @Param("vo") GoodsTradeQueryParam param);

    IPage<GoodsTradeQueryResult> queryByAGoodsDate(IPage<GoodsTradeQueryResult> page, @Param("vo") GoodsTradeQueryParam param);

    List<GoodsTradeQueryResult> queryByAGoods(@Param("vo") GoodsTradeQueryParam param);

    List<GoodsTradeQueryResult> queryByAGoodsDate(@Param("vo") GoodsTradeQueryParam param);

    IPage<MarketRunCutPositionResult> queryCutListFromOrderDetail(IPage<MarketRunCutPositionResult> page);

    IPage<TradeSumQueryResult> queryTradeSum(IPage<TradeSumQueryResult> page, @Param("vo") TradeSumQueryParam param);

    List<TradeSumQueryResult> queryTradeSum(@Param("vo") TradeSumQueryParam param);

    IPage<DeliveryOrderEntrustResult> queryDeliveryOrder(IPage<DeliveryOrderEntrustResult> page, @Param("vo") DeliveryOrderEntrustParam param);

    DeliveryOrderDetailResult queryDeliveryOrderById(@Param("deliveryorderid") String deliveryorderid, @Param("histradedate") String histradedate);

    List<Wrfactortypeitem> queryWRFactorTypeItemNew(@Param("wrfactortypeid") String wrfactortypeid);

    IPage<SettlementDealResult> querySettlementDeal(IPage<SettlementDealResult> page, @Param("vo") SettlementDealParam param);

    SettlementDealDetailResult settlementDealDetail(@Param("vo") SettlementDealDetailParam param);

    ApplyOrderDetailResult applyOrderDetailHis(@Param("deliveryorderid") String deliveryorderid);

    ApplyOrderDetailResult applyOrderDetail(@Param("deliveryorderid") String deliveryorderid);

    List<DeliveryDetailResult> getHisDeliveryDetailByBuyOrSellOrderId(@Param("sellId") String sellId, @Param("buyId") String buyId, @Param("buyorsell") Integer buyorsell);

    List<DeliveryDetailResult> getDeliveryDetailByBuyOrSellOrderId(@Param("sellId") String sellId, @Param("buyId") String buyId, @Param("buyorsell") Integer buyorsell);

    IPage<OfflineDeliveryResult> queryDeliveryOfflinePage(IPage<OfflineDeliveryResult> page, @Param("vo") OfflineDeliveryParam param);

    List<OfflineDeliveryResult> queryDeliveryOfflinePage(@Param("vo") OfflineDeliveryParam param);

    OfflineDeliveryDetailResult queryDeliveryOfflineDetail(@Param("deliveryorderid") String deliveryorderid);

    int closeDeliveryOffline(@Param("tradedate") String tradedate, @Param("deliveryorderid") String deliveryorderid);

    int failDeliveryOffline(@Param("tradedate") String tradedate, @Param("deliveryorderid") String deliveryorderid, @Param("auditremark") String auditremark);

    IPage<EsignrecordQueryResult> queryesignrecord(IPage<EsignrecordQueryResult> page, @Param("vo") EsignrecordQueryParam param);

    IPage<InvestorQueryResult> queryinvestor(IPage<InvestorQueryResult> page, @Param("vo") InvestorQueryParam param);

    IPage<HoldtransferQueryResult> holdtransferquery(IPage<HoldtransferQueryResult> page, @Param("vo") HoldtransferQueryParam param);
}
