package com.muchinfo.mtp3interface.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.muchinfo.mtp3pojos.entity.Quoter;
import com.muchinfo.mtp3pojos.entity.Useraccount;
import com.muchinfo.mtp3pojos.vo.GoodsQuoterDto;
import com.muchinfo.mtp3pojos.vo.common.OrganSelectResult;
import com.muchinfo.mtp3pojos.vo.tradingmarket.MmRelationResult;
import com.muchinfo.mtp3pojos.vo.tradingmarket.TradingManualQuoterParam;
import com.muchinfo.mtp3pojos.vo.tradingmarket.TradingManualQuoterResult;
import com.muchinfo.mtp3pojos.vo.tradingmarket.TradingQuerySecRelationResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 报价商表 Mapper 接口
 * </p>
 *
 * @author XKF
 * @since 2024-08-09
 */
@Mapper
public interface IQuoterMapper extends BaseMapper<Quoter> {

    List<Useraccount> getUserListExistsFirstByQuoter(@Param("quoterid") Long quoterid, @Param("matchuserid") Long matchuserid);

    List<Useraccount> getUserListNotExistsFirstByQuoter(@Param("quoterid") Long quoterid, @Param("matchuserid") Long matchuserid);

    IPage<TradingManualQuoterResult> queryGoodsQuoterPage(IPage<TradingManualQuoterResult> page, @Param("vo") TradingManualQuoterParam param);

    GoodsQuoterDto getParamByMap(@Param("goodsid") Long goodsid, @Param("areauserid") Long areauserid);

    GoodsQuoterDto getParamNewByMap(@Param("goodsid") Long goodsid, @Param("areauserid") Long areauserid, @Param("buyorsell") int buyorsell);

    GoodsQuoterDto getNewSellCurQty(@Param("goodsid") Long goodsid, @Param("quoterid") Long quoterid);

    OrganSelectResult getUserListNotExistsSec(@Param("searchcode") String searchcode);

    List<MmRelationResult> getExistsSecUserById(@Param("memberuserid")Long memberuserid);

    List<OrganSelectResult> getNotExistsSecUserById(@Param("ids") List<Long> ids);

    IPage<TradingQuerySecRelationResult> querySecRelation(IPage<TradingQuerySecRelationResult> page,@Param("memberuserid") Long memberuserid);
}
