1
zj
yesterday befbf57e4112d07003bff18102f556a1e5a154de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.yami.trading.service.trader;
 
import com.yami.trading.bean.trader.domain.Trader;
import com.yami.trading.bean.trader.domain.TraderFollowUser;
 
import java.math.BigDecimal;
import java.time.LocalDate;
 
/**
 * 跟单佣金:月固定预扣、按日已实现盈亏汇总与日终提成
 */
public interface FollowCommissionService {
 
    /**
     * 跟单平仓后累加「自然日」已实现盈亏(仅 DAILY_PROFIT_PCT 模式使用;按平仓时间归属日期,与是否当日停跟无关)
     */
    void accumulateDailyRealizedPnl(String followerPartyId, String traderPartyId, BigDecimal realizedProfit,
            long closeEpochSec);
 
    /**
     * 结算某一自然日的汇总行:日合计盈利则按带单员配置比例抽成,否则不抽
     *
     * @return 处理条数
     */
    int settleDailyPnlForDate(LocalDate pnlDate);
 
    /**
     * 开始跟单前:若带单员为月费模式且本周期未缴,则从跟随者主钱包扣费并写入 outEntity.monthlyFeePaidPeriod
     */
    void applyMonthlyFeeIfNeeded(Trader trader, TraderFollowUser existing, TraderFollowUser outEntity);
}