|
|
@ -33,10 +33,6 @@ public class StatisticsServiceImpl extends ServiceImpl<StatisticsMapper, Statist |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private SysLogService sysLogService; |
|
|
|
private SysLogService sysLogService; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
private StatisticsService statisticsService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 保存统计的数据 |
|
|
|
* 保存统计的数据 |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -55,18 +51,18 @@ public class StatisticsServiceImpl extends ServiceImpl<StatisticsMapper, Statist |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
//查询数据
|
|
|
|
//查询数据
|
|
|
|
Statistics statistics = statisticsService.getStatisticsBydateCalculated(sysLogStatisticsVo); |
|
|
|
Statistics statistics = this.getStatisticsBydateCalculated(sysLogStatisticsVo); |
|
|
|
//如果为空保存数据,如果不为空更新数据
|
|
|
|
//如果为空保存数据,如果不为空更新数据
|
|
|
|
if (statistics == null) { |
|
|
|
if (statistics == null) { |
|
|
|
statistics = new Statistics(); |
|
|
|
statistics = new Statistics(); |
|
|
|
statistics.setDateCalculated(sysLogStatisticsVo.getOperationTime()); |
|
|
|
statistics.setDateCalculated(sysLogStatisticsVo.getOperationTime()); |
|
|
|
statistics.setModuleNameNum(sysLogStatisticsVo.getModuleNameCount()); |
|
|
|
statistics.setModuleNameNum(sysLogStatisticsVo.getModuleNameCount()); |
|
|
|
statistics.setModuleName(sysLogStatisticsVo.getModuleName()); |
|
|
|
statistics.setModuleName(sysLogStatisticsVo.getModuleName()); |
|
|
|
statisticsService.save(statistics); |
|
|
|
this.save(statistics); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
statistics.setModuleName(sysLogStatisticsVo.getModuleName()); |
|
|
|
statistics.setModuleName(sysLogStatisticsVo.getModuleName()); |
|
|
|
statistics.setModuleNameNum(sysLogStatisticsVo.getModuleNameCount()); |
|
|
|
statistics.setModuleNameNum(sysLogStatisticsVo.getModuleNameCount()); |
|
|
|
statisticsService.updateById(statistics); |
|
|
|
this.updateById(statistics); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|