Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev 0.3 #1036

Merged
merged 2 commits into from
Jun 21, 2019
Merged

Dev 0.3 #1036

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix auth variable no operator bug
  • Loading branch information
shanmengm committed Jun 21, 2019
commit 4c5c19867b5c510a2476bd7e08f0a0bc3b493500
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,16 @@ public String replaceParams(String sql, Map<String, Object> queryParamMap, Map<S
Pattern p = Pattern.compile(getReg(REG_AUTHVAR, delimiter, true));
Matcher matcher = p.matcher(sql);

Map<String, List<SqlOperatorEnum>> operatorMap = Arrays.stream(SqlOperatorEnum.values()).collect(Collectors.groupingBy(e -> e.getValue()));

Set<String> expSet = new HashSet<>();
while (matcher.find()) {
expSet.add(matcher.group());
String group = matcher.group();
for (String key : operatorMap.keySet()) {
if (group.toUpperCase().contains(key)) {
expSet.add(group);
}
}
}
if (!CollectionUtils.isEmpty(expSet)) {
Map<String, String> parsedMap = getParsedExpression(expSet, authParamMap, delimiter);
Expand Down