parent
7863f11ef7
commit
42c1674a98
|
|
@ -1,5 +1,8 @@
|
|||
<template>
|
||||
<div>
|
||||
<div v-loading="loading"
|
||||
element-loading-text="拼命加载中"
|
||||
element-loading-spinner="el-icon-loading"
|
||||
element-loading-background="rgba(0, 0, 0, 0.8)">
|
||||
|
||||
<div ref="historyChart" style="height: 400px;width: 100%;margin-top: 25px">
|
||||
|
||||
|
|
@ -33,6 +36,9 @@ export default {
|
|||
return {
|
||||
historyApiData: {},
|
||||
todayApiData: {},
|
||||
|
||||
//遮罩层
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -93,7 +99,7 @@ export default {
|
|||
},
|
||||
yAxis: {
|
||||
splitNumber: 10,
|
||||
max:80,
|
||||
max:60,
|
||||
},
|
||||
series: [{
|
||||
name: '次数',
|
||||
|
|
@ -106,7 +112,9 @@ export default {
|
|||
|
||||
//查询API历史记录统计
|
||||
getStatisticsHistoryApi() {
|
||||
this.loading=true
|
||||
getStatisticsHistoryApi().then(res => {
|
||||
this.loading=false
|
||||
this.historyApiData = res.data
|
||||
this.initHistory()
|
||||
})
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@ public class ApiTopSearchController {
|
|||
@Log(title = "获取热搜榜")
|
||||
@RequiresPermissions("openapi:topsearch:list")
|
||||
public AjaxResult topSearch() {
|
||||
//清理重复数据
|
||||
topSearchService.deleteRepeatData();
|
||||
|
||||
if (redisService.hasKey(HOT)) {
|
||||
Map<String, List> cacheObject = redisService.getCacheObject(HOT);
|
||||
return AjaxResult.success(cacheObject);
|
||||
|
|
@ -70,6 +73,8 @@ public class ApiTopSearchController {
|
|||
@GetMapping("getTopsearchForRPC")
|
||||
@ApiOperation("内部远程调用热搜榜接口")
|
||||
public R<Map<String, List>> topSearchForRPC() {
|
||||
//清理重复数据
|
||||
topSearchService.deleteRepeatData();
|
||||
Map<String, List> map = topSearchService.getAllTopSearch();
|
||||
return R.ok(map);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,10 +64,6 @@ public class TopSearchServiceImpl implements TopSearchService {
|
|||
listHashMap.put("baiduList", baiduList);
|
||||
listHashMap.put("weiboList", weiboList);
|
||||
listHashMap.put("douyinList", douyinList);
|
||||
|
||||
//清理重复数据
|
||||
this.deleteRepeatData();
|
||||
|
||||
return listHashMap;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue