package com.muchinfo.mtp3interface.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.muchinfo.mtp3pojos.entity.Taaccount;
import com.muchinfo.mtp3pojos.vo.common.TAAccountChildrenResult;
import com.muchinfo.mtp3pojos.vo.investor.PersonalizationDelParam;
import com.muchinfo.mtp3pojos.vo.marketrun.TaaccountMonitorVo;
import com.muchinfo.mtp3pojos.vo.organ.UserAccountRoleParam;
import com.muchinfo.mtp3pojos.vo.organ.UserAccountRspResult;
import com.muchinfo.mtp3pojos.vo.reportform.RefUserResult;
import com.muchinfo.mtp3pojos.vo.reportform.TAAccountChildrenSelect;
import com.muchinfo.mtp3pojos.vo.taaccount.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 资金账户表 - 导历史 Mapper 接口
 * </p>
 *
 * @author XKF
 * @since 2024-04-16
 */
@Mapper
public interface ITaaccountMapper extends BaseMapper<Taaccount> {

    IPage<TaAccountQueryResult> queryTaAccountPage(IPage<TaAccountQueryResult> page, @Param("vo") TaAccountQueryParam taAccountQueryParam);

    List<TaAccountQueryResult> queryTAAccount(@Param("vo") TaAccountReportParam vo);

    IPage<TaAccountAmountStreamResult> selectAmountStream(IPage<TaAccountAmountStreamResult> page, @Param("vo") TaAccountAmountStreamParam param);

    List<TaAccountAmountStreamResult> selectAmountStream(@Param("vo") TaAccountAmountStreamParam param);

    List<TAAccountChildrenResult> queryTAAccountChildren(@Param("accountName") String accountName, @Param("areaUserId") Long areaUserId);

    List<RefUserResult> queryRefUserSelect(@Param("searchcode") String searchcode, @Param("refereeuserid") Long refereeuserid);

    List<TAAccountChildrenSelect> queryChildren(@Param("searchcode") String searchcode, @Param("relateduserid") Long relateduserid);

    TaaccountMonitorVo getMonitorInvestor(@Param("accountid") Long accountid, @Param("puserid") Long puserid);

    IPage<UserAccountRspResult> queryRoleOrganPage(IPage<UserAccountRspResult> page, @Param("vo") UserAccountRoleParam param);

    IPage<UserAccountRspResult> queryWarehouseOrganPage(IPage<UserAccountRspResult> page, @Param("vo") UserAccountRoleParam param);

    void deleteUserMarket(@Param("userid") Long userid, @Param("marketids") List<Long> marketids);

    List<Long> getNoTradeConfigAccounts(@Param("vo") PersonalizationDelParam param);

}
