From 3a2234cbcce1a00a85290287c841629503ce80bf Mon Sep 17 00:00:00 2001 From: "youHong.ai" <774495953@qq.com> Date: Tue, 13 Dec 2022 15:43:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E5=BE=84=E5=8F=82=E6=95=B0=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=EF=BC=9Fbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/aiyh/utils/Util.java | 2 +- .../weaver/xiao/commons/config/service/DealWithMapping.java | 2 +- src/test/java/youhong/ai/pcn/TestOrganization.java | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/aiyh/utils/Util.java b/src/main/java/aiyh/utils/Util.java index 12fb320..22e6544 100644 --- a/src/main/java/aiyh/utils/Util.java +++ b/src/main/java/aiyh/utils/Util.java @@ -3432,7 +3432,7 @@ public class Util extends weaver.general.Util { String classPath = split[0]; String paramStr = ""; if (split.length > 1) { - paramStr = Arrays.stream(split).skip(1).collect(Collectors.joining("")); + paramStr = Arrays.stream(split).skip(1).collect(Collectors.joining("?")); } /* 获取?后的参数:"weaver.aiyh_jitu.pushdata.service.toones.GetRequestValueCusGetValueImpl?" + "requestType=get&apiOnlyMark=getAssign&valueKey=data&assign=#{main.zd2}&" + diff --git a/src/main/java/weaver/xiao/commons/config/service/DealWithMapping.java b/src/main/java/weaver/xiao/commons/config/service/DealWithMapping.java index d64a447..ebc7b22 100644 --- a/src/main/java/weaver/xiao/commons/config/service/DealWithMapping.java +++ b/src/main/java/weaver/xiao/commons/config/service/DealWithMapping.java @@ -1347,7 +1347,7 @@ public class DealWithMapping extends ToolUtil { String classPath = split[0]; String paramStr = ""; if (split.length > 1) { - paramStr = Arrays.stream(split).skip(1).collect(Collectors.joining("")); + paramStr = Arrays.stream(split).skip(1).collect(Collectors.joining("?")); } /* 获取?后的参数:"weaver.aiyh_jitu.pushdata.service.toones.GetRequestValueCusGetValueImpl?" + "requestType=get&apiOnlyMark=getAssign&valueKey=data&assign=#{main.zd2}&" + diff --git a/src/test/java/youhong/ai/pcn/TestOrganization.java b/src/test/java/youhong/ai/pcn/TestOrganization.java index 3c6f640..07921f2 100644 --- a/src/test/java/youhong/ai/pcn/TestOrganization.java +++ b/src/test/java/youhong/ai/pcn/TestOrganization.java @@ -109,8 +109,11 @@ public class TestOrganization extends BaseTest { @Test public void testStaticLog() { log.info("哈哈哈好的方式"); - String testStr = "slflas.fasjdflaf.fasdf?hah=liuliu&cus=`select? * fr$%&#@!)(<>?/\\{}「」【【】[]~、asfom table where id = '' and teset = #{name}`&niua=卧槽"; + String testStr = "weaver.xuanran.wang.schroeder.cus_field_value.PushSealTaskSealValue?sealSnField=sealSn&sealNumField=sealNum&sealSnCusSql=`select\n" + + "? from jkfdjsfk where id\n" + + "=1`&sealNumCusSql=`select case ? when 0 then htzyzcs when 1 then gzcs else frzcs end from formtable_main_22_dt1 where id = {?dt.id}`&cus=`select * from table id = ? and test = ?`"; Map stringStringMap = Util.parseCusInterfacePathParam(testStr); + System.out.println(stringStringMap); System.out.println(JSON.toJSONString(stringStringMap)); //String pattern = "&?(?([#.\\w\\u4E00-\\u9FA5]+))=" + // "(?(`([():/\\-&$#='*{ }.\\w\\u4E00-\\u9FA5?]*)`|((#(\\{|sql\\{))?([():/\\-$#={ }.\\w\\u4E00-\\u9FA5?]+)?}?)))&?";