mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 19:51:00 +00:00
(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:
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user