fix:87339

This commit is contained in:
梁琦涛
2024-07-24 16:17:26 +08:00
parent 556b9c7f2f
commit 050ccf54dd
3 changed files with 5 additions and 4 deletions
@@ -223,7 +223,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] + "', '')) ");
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("+");