(feature)add metric check parser in chat and add metric check convert in semantic, download metric data in semantic (#241)

* (improvement)(chat) add metric check parser

* (improvement)(semantic) support metric data download

---------

Co-authored-by: jolunoluo
This commit is contained in:
LXW
2023-10-17 13:20:20 +08:00
committed by GitHub
parent 207d6cba43
commit a9bb1c1f68
16 changed files with 294 additions and 54 deletions

View File

@@ -2,6 +2,7 @@ package com.tencent.supersonic.common.pojo;
public enum ReturnCode {
SUCCESS(200, "success"),
INVALID_REQUEST(400, "invalid request"),
INVALID_PERMISSION(401, "invalid permission"),
ACCESS_ERROR(403, "access denied"),
SYSTEM_ERROR(500, "system error");

View File

@@ -18,6 +18,7 @@ public class DateUtils {
public static final String DATE_FIELD = "数据日期";
public static final String TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
public static final String FORMAT = "yyyyMMddHHmmss";
public static Integer currentYear() {
Date date = new Date();
@@ -116,6 +117,11 @@ public class DateUtils {
return dateFormat.format(date);
}
public static String format(Date date, String format) {
DateFormat dateFormat = new SimpleDateFormat(format);
return dateFormat.format(date);
}
private static boolean containsTime(Date date) {
DateFormat timeFormat = new SimpleDateFormat("HH:mm:ss");
String timeString = timeFormat.format(date);