(improvement)(headless) Update server and core, server calls core one-way (#592)

* (improvement)(headless) Update server and core, server calls core one-way
* (improvement)(Auth) When obtaining the user information, determine whether the user is a system admin.
---------

Co-authored-by: jolunoluo
This commit is contained in:
LXW
2024-01-04 12:08:12 +08:00
committed by GitHub
parent 7acb48da0e
commit 0858c13365
100 changed files with 811 additions and 1516 deletions

View File

@@ -0,0 +1,19 @@
package com.tencent.supersonic.headless.api.enums;
public enum DatasourceQuery {
SQL_QUERY("sql_query"),
TABLE_QUERY("table_query");
private String name;
DatasourceQuery(String name) {
this.name = name;
}
public String getName() {
return name;
}
}

View File

@@ -0,0 +1,30 @@
package com.tencent.supersonic.headless.api.enums;
public enum EngineType {
TDW(0, "tdw"),
MYSQL(1, "mysql"),
DORIS(2, "doris"),
CLICKHOUSE(3, "clickhouse"),
KAFKA(4, "kafka"),
H2(5, "h2");
private Integer code;
private String name;
EngineType(Integer code, String name) {
this.code = code;
this.name = name;
}
public Integer getCode() {
return code;
}
public String getName() {
return name;
}
}

View File

@@ -7,6 +7,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
@Data
@ToString
@@ -27,4 +28,8 @@ public class QueryS2SQLReq {
return Lists.newArrayList(modelIds);
}
public String getModelIdStr() {
return String.join(",", modelIds.stream().map(Object::toString).collect(Collectors.toList()));
}
}

View File

@@ -82,6 +82,10 @@ public class QueryStructReq {
return Lists.newArrayList(modelIds);
}
public String getModelIdStr() {
return String.join(",", modelIds.stream().map(Object::toString).collect(Collectors.toList()));
}
public Set<Long> getModelIdSet() {
return modelIds;
}