添加统计接口

This commit is contained in:
孙小云 2026-01-23 16:19:47 +08:00
parent 6fdeda5315
commit 24299d7d25
3 changed files with 29 additions and 1 deletions

View File

@ -25,4 +25,22 @@ public interface RemoteStatisticsService
*/ */
@GetMapping("/statistics") @GetMapping("/statistics")
R<StatisticsVO> getStatistics(@RequestHeader(SecurityConstants.FROM_SOURCE) String source); R<StatisticsVO> getStatistics(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
* 获取系统统计信息
*
* @param source 请求来源
* @return 统计信息
*/
@GetMapping("/statistics/dji")
R<StatisticsVO> getDjiStatistics(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
* 获取系统统计信息
*
* @param source 请求来源
* @return 统计信息
*/
@GetMapping("/statistics/th")
R<StatisticsVO> getThStatistics(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
} }

View File

@ -30,6 +30,16 @@ public class RemoteStatisticsFallbackFactory implements FallbackFactory<RemoteSt
{ {
return R.fail("获取统计信息失败:" + throwable.getMessage()); return R.fail("获取统计信息失败:" + throwable.getMessage());
} }
@Override
public R<StatisticsVO> getDjiStatistics(String source) {
return R.fail("获取统计信息失败:" + throwable.getMessage());
}
@Override
public R<StatisticsVO> getThStatistics(String source) {
return R.fail("获取统计信息失败:" + throwable.getMessage());
}
}; };
} }
} }

@ -1 +1 @@
Subproject commit b559487474c37573edfff43bc44ac60fcf6a7ace Subproject commit 603b62cf212313eb63355c9562457d5975f5bafc