code refactor

This commit is contained in:
laker
2024-03-25 20:10:40 +08:00
parent cca26d8e60
commit 6c7a7f416e
2 changed files with 6 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
# 启动命令 docker-compose up 在后台执行该服务可以加上 -d,docker-compose up -d
# 停止命令 docker-compose down 同时删除卷docker-compose down -v
# 构建镜像 docker-compose build
# 启动容器命令 docker-compose up 在后台执行该服务可以加上 -d,docker-compose up -d
# 停止删除命令 docker-compose down 同时删除卷docker-compose down -v
version: "3.4"
# 项目名称
name: easy-admin

View File

@@ -66,7 +66,7 @@ public class ExtLogController {
queryWrapper.like(ExtLog::getUri, keyWord);
}
queryWrapper.orderByDesc(ExtLog::getCreateTime);
Page pageList = extLogService.page(roadPage, queryWrapper);
Page<ExtLog> pageList = extLogService.page(roadPage, queryWrapper);
List<ExtLog> records = pageList.getRecords();
records.forEach(extLog -> {
if (extLog.getUserId() != null) {
@@ -79,14 +79,14 @@ public class ExtLogController {
@GetMapping("/visits7day")
@ApiOperation(value = "7天访问量")
public Response visits7day() {
public Response<List<LogStatisticsVo>> visits7day() {
List<LogStatisticsVo> logStatisticsVo = extLogMapper.selectStatistics7Day();
return Response.ok(logStatisticsVo);
}
@GetMapping("/visitsTop10IP")
@ApiOperation(value = "visitsTop10IP")
public PageResponse visitsTop10IP() {
public PageResponse<List<LogStatisticsTop10Vo>> visitsTop10IP() {
List<LogStatisticsTop10Vo> logStatisticsVo = extLogMapper.selectStatisticsVisitsTop10IP();
return PageResponse.ok(logStatisticsVo, 10L);
}