|
|
@ -96,26 +96,27 @@ public class SearchConditionVo extends PageVo implements Serializable { |
|
|
|
if (StringUtils.isBlankAny(table, fieldName)) { |
|
|
|
if (StringUtils.isBlankAny(table, fieldName)) { |
|
|
|
return Strings.EMPTY; |
|
|
|
return Strings.EMPTY; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
String value = fieldValue; |
|
|
|
if (Arrays.asList(STRING_TYPES).contains(dataType) || |
|
|
|
if (Arrays.asList(STRING_TYPES).contains(dataType) || |
|
|
|
Arrays.asList(DATE_TYPES).contains(dataType)) { |
|
|
|
Arrays.asList(DATE_TYPES).contains(dataType)) { |
|
|
|
fieldValue = "'" + fieldValue + "'"; |
|
|
|
value = "'" + fieldValue + "'"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ("like_all".equalsIgnoreCase(logicJudgement)) { |
|
|
|
if ("like_all".equalsIgnoreCase(logicJudgement)) { |
|
|
|
logicJudgement = "like"; |
|
|
|
logicJudgement = "like"; |
|
|
|
fieldValue = fieldValue.substring(1, fieldValue.length() - 1); |
|
|
|
value = fieldValue.substring(1, fieldValue.length() - 1); |
|
|
|
fieldValue = "'%" + fieldValue + "%'"; |
|
|
|
value = "'%" + value + "%'"; |
|
|
|
} else if ("like_left".equalsIgnoreCase(logicJudgement)) { |
|
|
|
} else if ("like_left".equalsIgnoreCase(logicJudgement)) { |
|
|
|
logicJudgement = "like"; |
|
|
|
logicJudgement = "like"; |
|
|
|
fieldValue = fieldValue.substring(1); |
|
|
|
value = fieldValue.substring(1); |
|
|
|
fieldValue = "'%" + fieldValue; |
|
|
|
value = "'%" + value; |
|
|
|
} else if ("like_right".equalsIgnoreCase(logicJudgement)) { |
|
|
|
} else if ("like_right".equalsIgnoreCase(logicJudgement)) { |
|
|
|
logicJudgement = "like"; |
|
|
|
logicJudgement = "like"; |
|
|
|
fieldValue = fieldValue.substring(0, fieldValue.length() - 1); |
|
|
|
value = fieldValue.substring(0, fieldValue.length() - 1); |
|
|
|
fieldValue = fieldValue + "%'"; |
|
|
|
value = value + "%'"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return " " + logicJoin + " \"" + table + "\".\"" + fieldName + "\" " + logicJudgement + " " + fieldValue; |
|
|
|
return " " + logicJoin + " \"" + table + "\".\"" + fieldName + "\" " + logicJudgement + " " + value; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|