路径参数获取?bug修复

main
youHong.ai 2022-12-13 15:43:15 +08:00
parent 1f59f96dac
commit 3a2234cbcc
3 changed files with 6 additions and 3 deletions

View File

@ -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}&" +

View File

@ -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}&" +

View File

@ -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<String, String> stringStringMap = Util.parseCusInterfacePathParam(testStr);
System.out.println(stringStringMap);
System.out.println(JSON.toJSONString(stringStringMap));
//String pattern = "&?(?<key>([#.\\w\\u4E00-\\u9FA5]+))=" +
// "(?<value>(`([():/\\-&$#='*{ }.\\w\\u4E00-\\u9FA5?]*)`|((#(\\{|sql\\{))?([():/\\-$#={ }.\\w\\u4E00-\\u9FA5?]+)?}?)))&?";