feat(88189): 标准拆分--编辑--查询--多日期查询,查的是范围了
This commit is contained in:
+3
-2
@@ -41,9 +41,9 @@ public class DateManyConditionImpl extends AbstractConditionBase {
|
||||
String substringEndFirst = ", ',', 1)";
|
||||
String substringEndLast = ", ',', -1)";
|
||||
String dateMany = DocumentSplitCommon.AND;
|
||||
if (value.contains(",")) {
|
||||
String[] split = value.split(",");
|
||||
if (value.contains(",") && !split[0].equals(split[1])) {
|
||||
// 范围查询
|
||||
String[] split = value.split(",");
|
||||
dateMany += "(";
|
||||
String startDate = DocumentSplitCommon.DATE_FORMAT_BEGIN + "'" + split[0] + "'" + DocumentSplitCommon.DATE_FORMAT_END;
|
||||
String endDate = DocumentSplitCommon.DATE_FORMAT_BEGIN + "'" + split[1] + "'" + DocumentSplitCommon.DATE_FORMAT_END;
|
||||
@@ -63,6 +63,7 @@ public class DateManyConditionImpl extends AbstractConditionBase {
|
||||
endDate + DocumentSplitCommon.BETWEEN + DocumentSplitCommon.DATE_FORMAT_BEGIN + substringBegin + fieldName + substringEndFirst + DocumentSplitCommon.DATE_FORMAT_END + DocumentSplitCommon.AND + DocumentSplitCommon.DATE_FORMAT_BEGIN + substringBegin + fieldName + substringEndLast + DocumentSplitCommon.DATE_FORMAT_END +
|
||||
")" + ")";
|
||||
} else {
|
||||
value = split[0];
|
||||
dateMany += fieldName + DocumentSplitCommon.LIKE + DocumentSplitCommon.CONCAT_LIKE_BEGIN + value + DocumentSplitCommon.CONCAT_LIKE_END;
|
||||
}
|
||||
return dateMany;
|
||||
|
||||
Reference in New Issue
Block a user