From c8c2432868e9f43def4a990a0ba71ba86b4912c1 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Thu, 1 Jul 2021 18:17:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97):=20?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E5=AD=98=E5=82=A8=E5=88=97?= =?UTF-8?q?=E9=95=BF=E5=BA=A6=E4=BF=9D=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/metersphere/log/aspect/MsLogAspect.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/src/main/java/io/metersphere/log/aspect/MsLogAspect.java b/backend/src/main/java/io/metersphere/log/aspect/MsLogAspect.java index 57f1125654..7e501bc2b5 100644 --- a/backend/src/main/java/io/metersphere/log/aspect/MsLogAspect.java +++ b/backend/src/main/java/io/metersphere/log/aspect/MsLogAspect.java @@ -244,6 +244,12 @@ public class MsLogAspect { } String path = request.getServletPath(); + if (StringUtils.isNotEmpty(msOperLog.getSourceId()) && msOperLog.getSourceId().length() > 6000) { + msOperLog.setSourceId(msOperLog.getSourceId().substring(0, 5999)); + } + if (StringUtils.isNotEmpty(msOperLog.getOperTitle()) && msOperLog.getOperTitle().length() > 6000) { + msOperLog.setOperTitle(msOperLog.getOperTitle().substring(0, 5999)); + } msOperLog.setOperPath(path); operatingLogService.create(msOperLog); }