package com.copy.trade.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.copy.trade.entity.po.Position;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.copy.trade.entity.vo.FollowOrderVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 跟单持仓表 Mapper 接口
 * </p>
 *
 * @author wz
 * @since 2022-11-17
 */
public interface PositionMapper extends BaseMapper<Position> {
    List<FollowOrderVo> currentFollow(@Param("page") Page page, @Param("customerId") Long customerId);

    List<FollowOrderVo> historyFollow(@Param("page") Page page, @Param("customerId") Long customerId);

    List<FollowOrderVo> leadCurrent(@Param("page")Page page, @Param("traderId")Long traderId);

    List<FollowOrderVo> leadHistory(@Param("page")Page page, @Param("traderId")Long traderId);
    
    BigDecimal selectDividendFee(@Param("position")Position position);
    
    BigDecimal selectStudentProfit(@Param("position")Position position);

}
