|
@@ -464,7 +464,9 @@ public class PartitionCrashServiceImpl implements PartitionCrashService {
|
|
|
|
|
|
//确保每天只有一条记录
|
|
|
PtProfitDailyStatisticsLogDO ptLog = ptProfitDailyStatisticsLogMapper.selectByEveryday(now);
|
|
|
+ Long totalCollisionAmount = 0L;
|
|
|
if (ptLog != null) {
|
|
|
+ totalCollisionAmount = ptLog.getTotalCollisionAmount();
|
|
|
ptProfitDailyStatisticsLogMapper.deleteById(ptLog.getId());
|
|
|
}
|
|
|
//获取平台总收益
|
|
@@ -472,8 +474,8 @@ public class PartitionCrashServiceImpl implements PartitionCrashService {
|
|
|
|
|
|
ptLog = new PtProfitDailyStatisticsLogDO();
|
|
|
ptLog.setEveryday(now);
|
|
|
- if (!ptLog.getTotalCollisionAmount().equals(0L)) {
|
|
|
- ptLog.setTotalCollisionAmount(sum + ptLog.getTotalCollisionAmount());
|
|
|
+ if (totalCollisionAmount.equals(0L)) {
|
|
|
+ ptLog.setTotalCollisionAmount(sum + totalCollisionAmount);
|
|
|
} else {
|
|
|
ptLog.setTotalCollisionAmount(sum);
|
|
|
}
|