fix: es 时间格式

This commit is contained in:
taojinlong 2022-01-30 00:11:30 +08:00
parent 8986e4cc3a
commit 2a62c35673
2 changed files with 8 additions and 8 deletions

View File

@ -942,24 +942,24 @@ public class EsQueryProvider extends QueryProvider {
}
if (StringUtils.isEmpty(dateStyle)) {
return "YYYY-MM-dd HH:mm:ss";
return "yyyy-MM-dd HH:mm:ss";
}
switch (dateStyle) {
case "y":
return "YYYY";
return "yyyy";
case "y_M":
return "YYYY" + split + "MM";
return "yyyy" + split + "MM";
case "y_M_d":
return "YYYY" + split + "MM" + split + "dd";
return "yyyy" + split + "MM" + split + "dd";
case "H_m_s":
return "HH:mm:ss";
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":
return "YYYY" + split + "MM" + split + "dd" + " HH:mm:ss";
return "yyyy" + split + "MM" + split + "dd" + " HH:mm:ss";
default:
return "YYYY-MM-dd HH:mm:ss";
return "yyyy-MM-dd HH:mm:ss";
}
}

View File

@ -21,7 +21,7 @@ public class EsSqlLConstants extends SQLConstants {
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,'')";