Przeglądaj źródła

解决定时任务无法从request获取ip地址的问题

wangmiaomiao 9 miesięcy temu
rodzic
commit
c067732d7b

+ 2 - 1
slibra-quartz/src/main/java/com/slibra/quartz/task/RyTask.java

@@ -1273,7 +1273,8 @@ public class RyTask
         chatRequest.setSessionId(sessionId);
         chatRequest.setHistoryDia(historyDates);
         Map<String, Object> extra = new HashMap<>();
-        extra.put("ip_address", IpUtils.getIpAddr());
+//        extra.put("ip_address", IpUtils.getIpAddr());
+        extra.put("ip_address", null);
         chatRequest.setExtra(extra);
         chatRequest.setStrengthen(true);
         return JSON.toJSONString(chatRequest);