| | |
| | | @Resource |
| | | private FollowTraderProfitInfoDao followTraderProfitInfoDao; |
| | | |
| | | |
| | | //@Scheduled(cron = "0 0/30 * * * ? ") |
| | | @Scheduled(cron = "0/5 * * * * ? *") |
| | | @Scheduled(cron = "0/5 * * * * ?") |
| | | public void traderProfitUpdate() { |
| | | log.info("交易员定时任务执行"); |
| | | // 查询所有交易员信息 |
| | |
| | | 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); |