From 74863c38a407b1e0f36250dfa0c63e5da7fe5f66 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期一, 19 一月 2026 18:06:51 +0800
Subject: [PATCH] WMS功能完善

---
 src/main/java/com/zy/common/config/ControllerResAdvice.java |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/zy/common/config/ControllerResAdvice.java b/src/main/java/com/zy/common/config/ControllerResAdvice.java
index a4cdc97..b30f16a 100644
--- a/src/main/java/com/zy/common/config/ControllerResAdvice.java
+++ b/src/main/java/com/zy/common/config/ControllerResAdvice.java
@@ -1,8 +1,10 @@
 package com.zy.common.config;
 
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.core.common.Cools;
 import com.core.common.R;
+import com.zy.asrs.entity.mes.MesReturn;
 import com.zy.asrs.service.ApiLogService;
 import com.zy.common.utils.IpTools;
 import lombok.extern.slf4j.Slf4j;
@@ -59,6 +61,35 @@
                         );
                     }
                 }
+                if (o instanceof MesReturn) {
+                    MesReturn mesReturn = (MesReturn) o;
+                    String appkey = request.getHeader("appkey");
+                    Object reqCache = request.getAttribute("cache");
+                    // 淇濆瓨鎺ュ彛鏃ュ織
+                    apiLogService.save(
+                            String.valueOf(appAuth),
+                            request.getRequestURI(),
+                            appkey,
+                            IpTools.gainRealIp(request),
+                            reqCache==null?"": JSON.toJSONString(reqCache),
+                            JSON.toJSONString(o),
+                            String.valueOf(mesReturn.getSuccess()).equalsIgnoreCase("1")
+                    );
+                }
+                if (o instanceof JSONObject) {
+                    String appkey = request.getHeader("appkey");
+                    Object reqCache = request.getAttribute("cache");
+                        // 淇濆瓨鎺ュ彛鏃ュ織
+                        apiLogService.save(
+                                String.valueOf(appAuth),
+                                request.getRequestURI(),
+                                appkey,
+                                IpTools.gainRealIp(request),
+                                reqCache==null?"": JSON.toJSONString(reqCache),
+                                JSON.toJSONString(o),
+                                String.valueOf(((JSONObject) o).get("Success")).equalsIgnoreCase("1")
+                        );
+                }
             }
         }
         return o;

--
Gitblit v1.9.1