From 8d84af60d4f04f2a675b6b89351ac959b9e47d80 Mon Sep 17 00:00:00 2001
From: 1 <1>
Date: 星期一, 17 十一月 2025 13:40:56 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/controller/BasRgvErrorLogController.java |   36 +++++++++++++++++++++++++++++-------
 1 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/BasRgvErrorLogController.java b/src/main/java/com/zy/asrs/controller/BasRgvErrorLogController.java
index 88cf866..ad0d3ac 100644
--- a/src/main/java/com/zy/asrs/controller/BasRgvErrorLogController.java
+++ b/src/main/java/com/zy/asrs/controller/BasRgvErrorLogController.java
@@ -6,6 +6,7 @@
 import com.baomidou.mybatisplus.mapper.Wrapper;
 import com.baomidou.mybatisplus.plugins.Page;
 import com.core.common.DateUtils;
+import com.zy.asrs.entity.BasCrnErrorLog;
 import com.zy.asrs.entity.BasRgvErrorLog;
 import com.zy.asrs.service.BasRgvErrorLogService;
 import com.core.annotations.ManagerAuth;
@@ -32,20 +33,41 @@
 
     @RequestMapping(value = "/basRgvErrorLog/list/auth")
     @ManagerAuth
-    public R list(@RequestParam(defaultValue = "1")Integer curr,
-                  @RequestParam(defaultValue = "10")Integer limit,
-                  @RequestParam(required = false)String orderByField,
-                  @RequestParam(required = false)String orderByType,
-                  @RequestParam(required = false)String condition,
-                  @RequestParam Map<String, Object> param){
+    public R list(@RequestParam(defaultValue = "1") Integer curr,
+                  @RequestParam(defaultValue = "10") Integer limit,
+                  @RequestParam(required = false) String orderByField,
+                  @RequestParam(required = false) String orderByType,
+                  @RequestParam(required = false) String condition,
+                  @RequestParam Map<String, Object> param) {
         EntityWrapper<BasRgvErrorLog> wrapper = new EntityWrapper<>();
         excludeTrash(param);
         convert(param, wrapper);
         allLike(BasRgvErrorLog.class, param.keySet(), wrapper, condition);
-        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
+
+        if (Cools.isEmpty(orderByField)) {
+            wrapper.orderBy("create_time", false);
+        } else {
+            wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
+        }
+
         return R.ok(basRgvErrorLogService.selectPage(new Page<>(curr, limit), wrapper));
     }
+    /**
+     * 鏍规嵁绮剧‘鐨� createTime 鏌ヨ
+     */
+    @RequestMapping(value = "/basRgvErrorLog/listByUuid/auth")
+    @ManagerAuth
+    public R listByUuid(@RequestParam String uuid,
+                        @RequestParam(defaultValue = "1") Integer curr,
+                        @RequestParam(defaultValue = "10") Integer limit) {
 
+        EntityWrapper<BasRgvErrorLog> wrapper = new EntityWrapper<>();
+        // 绮剧‘鍖归厤褰撳ぉ鐨勬暟鎹紝鎴栬�呮煇涓叿浣撴椂闂�
+        wrapper.eq("id", uuid); // 濡傛灉甯屾湜绮剧‘鍒扮
+
+        Page<BasRgvErrorLog> page = basRgvErrorLogService.selectPage(new Page<>(curr, limit), wrapper);
+        return R.ok(page);
+    }
     private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){
         for (Map.Entry<String, Object> entry : map.entrySet()){
             String val = String.valueOf(entry.getValue());

--
Gitblit v1.9.1