Helius
2021-03-30 0d74b08831ab8d77d065104985623c829b3e27f2
src/main/java/com/xcong/excoin/quartz/job/FollowProfitUpdateJob.java
@@ -41,8 +41,9 @@
    @Resource
    private FollowTraderProfitInfoDao followTraderProfitInfoDao;
    //@Scheduled(cron = "0 0/30 * * * ? ")
    @Scheduled(cron = "0/5 * * * * ? *")
    @Scheduled(cron = "0/5 * * * * ?")
    public void traderProfitUpdate() {
        log.info("交易员定时任务执行");
        // 查询所有交易员信息
@@ -52,7 +53,8 @@
                Long tradeMemberId = trader.getMemberId();
                FollowTraderProfitInfoEntity traderInfoProfit = followTraderProfitInfoDao.selectTraderInfoProfitByMemberId(tradeMemberId);
                // 累计收益率
                BigDecimal totalProfitRatio = contractOrderDao.selectFollowOrderTotalProfitByMemberId(tradeMemberId).setScale(2, BigDecimal.ROUND_DOWN);
                BigDecimal ljsyl = contractOrderDao.selectFollowOrderTotalProfitByMemberId(tradeMemberId);
                BigDecimal totalProfitRatio = (ljsyl == null?BigDecimal.ZERO:ljsyl.setScale(2, BigDecimal.ROUND_DOWN));
                traderInfoProfit.setTotalProfitRatio(totalProfitRatio);
                // 带单总收益,只查询交易员自己的带单总收益
                BigDecimal totalProfit = followFollowerOrderRelationDao.selectTraderTotalProfitSelf(tradeMemberId);