fix: 尝试修复日期过滤存在时区差异的问题

This commit is contained in:
junjun 2024-09-12 11:43:52 +08:00
parent 057f18c1f5
commit f81b28ea58
2 changed files with 8 additions and 2 deletions

View File

@ -182,8 +182,11 @@ public class CustomWhere2Str {
whereValue = String.format(SQLConstants.WHERE_BETWEEN, Utils.transLong2Str(stringLongMap.get("startTime")), Utils.transLong2Str(stringLongMap.get("endTime")));
}
} else {
long ts = Utils.allDateFormat2Long(value);
if (isCross) {
value = Utils.allDateFormat2Long(value) + "";
value = ts + "";
} else {
value = Utils.transLong2Str(ts);
}
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value);
}

View File

@ -192,8 +192,11 @@ public class WhereTree2Str {
whereValue = String.format(SQLConstants.WHERE_BETWEEN, Utils.transLong2Str(stringLongMap.get("startTime")), Utils.transLong2Str(stringLongMap.get("endTime")));
}
} else {
long ts = Utils.allDateFormat2Long(value);
if (isCross) {
value = Utils.allDateFormat2Long(value) + "";
value = ts + "";
} else {
value = Utils.transLong2Str(ts);
}
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value);
}