提交 2a62c356 authored 作者: taojinlong's avatar taojinlong

fix: es 时间格式

上级 8986e4cc
...@@ -942,24 +942,24 @@ public class EsQueryProvider extends QueryProvider { ...@@ -942,24 +942,24 @@ public class EsQueryProvider extends QueryProvider {
} }
if (StringUtils.isEmpty(dateStyle)) { if (StringUtils.isEmpty(dateStyle)) {
return "YYYY-MM-dd HH:mm:ss"; return "yyyy-MM-dd HH:mm:ss";
} }
switch (dateStyle) { switch (dateStyle) {
case "y": case "y":
return "YYYY"; return "yyyy";
case "y_M": case "y_M":
return "YYYY" + split + "MM"; return "yyyy" + split + "MM";
case "y_M_d": case "y_M_d":
return "YYYY" + split + "MM" + split + "dd"; return "yyyy" + split + "MM" + split + "dd";
case "H_m_s": case "H_m_s":
return "HH:mm:ss"; return "HH:mm:ss";
case "y_M_d_H_m": case "y_M_d_H_m":
return "YYYY" + split + "MM" + split + "dd" + " HH:mm"; return "yyyy" + split + "MM" + split + "dd" + " HH:mm";
case "y_M_d_H_m_s": case "y_M_d_H_m_s":
return "YYYY" + split + "MM" + split + "dd" + " HH:mm:ss"; return "yyyy" + split + "MM" + split + "dd" + " HH:mm:ss";
default: default:
return "YYYY-MM-dd HH:mm:ss"; return "yyyy-MM-dd HH:mm:ss";
} }
} }
......
...@@ -21,7 +21,7 @@ public class EsSqlLConstants extends SQLConstants { ...@@ -21,7 +21,7 @@ public class EsSqlLConstants extends SQLConstants {
public static final String ROUND = "ROUND(%s, %s)"; public static final String ROUND = "ROUND(%s, %s)";
public static final String DEFAULT_DATE_FORMAT = "YYYY-MM-dd HH:mm:ss"; public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
public static final String WHERE_VALUE_NULL = "(NULL,'')"; public static final String WHERE_VALUE_NULL = "(NULL,'')";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论