From 8257d89c461f6553d66fad1e5e3df3d172a00924 Mon Sep 17 00:00:00 2001
From: 1 <1>
Date: 星期六, 29 十一月 2025 18:10:18 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/controller/ApiLogController.java | 27 +++++++++++++++++++++++++--
1 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/ApiLogController.java b/src/main/java/com/zy/asrs/controller/ApiLogController.java
index 1ba16f5..0b3fbc5 100644
--- a/src/main/java/com/zy/asrs/controller/ApiLogController.java
+++ b/src/main/java/com/zy/asrs/controller/ApiLogController.java
@@ -42,7 +42,26 @@
EntityWrapper<ApiLog> wrapper = new EntityWrapper<>();
excludeTrash(param);
convert(param, wrapper);
- if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
+ if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else {
+ wrapper.orderBy("create_time", false);
+ }
+ return R.ok(apiLogService.selectPage(new Page<>(curr, limit), wrapper));
+ }
+
+ @RequestMapping(value = "/apiLog/list/auth/v2")
+ @ManagerAuth
+ public R listFalse(@RequestParam(defaultValue = "1")Integer curr,
+ @RequestParam(defaultValue = "10")Integer limit,
+ @RequestParam(required = false)String orderByField,
+ @RequestParam(required = false)String orderByType,
+ @RequestParam Map<String, Object> param){
+ EntityWrapper<ApiLog> wrapper = new EntityWrapper<>();
+ excludeTrash(param);
+ convert(param, wrapper);
+ wrapper.eq("result", 0);
+ if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else {
+ wrapper.orderBy("create_time", false);
+ }
return R.ok(apiLogService.selectPage(new Page<>(curr, limit), wrapper));
}
@@ -54,7 +73,11 @@
wrapper.ge(entry.getKey(), DateUtils.convert(dates[0]));
wrapper.le(entry.getKey(), DateUtils.convert(dates[1]));
} else {
- wrapper.like(entry.getKey(), val);
+ if (entry.getKey().equals("url")){
+ wrapper.like(entry.getKey(), val).or().like("client_ip", val);
+ } else {
+ wrapper.like(entry.getKey(), val);
+ }
}
}
}
--
Gitblit v1.9.1