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