From c52f2cff2d8b4bd6cc676ef7d03691e34407da2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=90=A6=E6=B6=9B?= Date: Wed, 24 Jul 2024 16:18:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=87=E9=A2=98=E6=A3=80?= =?UTF-8?q?=E7=B4=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../laws/home/service/impl/LawsHomeSearchServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/laws/home/service/impl/LawsHomeSearchServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/laws/home/service/impl/LawsHomeSearchServiceImpl.java index fa234b2b..2e01f909 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/home/service/impl/LawsHomeSearchServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/home/service/impl/LawsHomeSearchServiceImpl.java @@ -168,9 +168,9 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService { select.append("( "); for (int i = 0; i < searchContent.length; i++) { regexp.append(searchContent[i]); - select.append(" LENGTH(standard_name) - LENGTH(REPLACE(standard_name, '" + searchContent[i] + "'," + - " '" + (searchContent[i].length() > 1 ? - searchContent[i].substring(0,searchContent[i].length()-1) : "") + "')) "); + select.append(" LENGTH(standard_name) - LENGTH(REPLACE(standard_name, '").append(searchContent[i]) + .append("',").append(" '").append(searchContent[i].length() > 1 ? + searchContent[i].substring(0, searchContent[i].length() - 1) : "").append("')) "); if(i != searchContent.length - 1){ regexp.append("|"); select.append("+");