diff --git a/de-xpack b/de-xpack index 723bb9ff96..f280417456 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit 723bb9ff960159769673ac58982f07b18e6aa181 +Subproject commit f28041745618304f6421a42d3ceaac68b96960a0 diff --git a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/apikey/api/ApiKeyApi.java b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/apikey/api/ApiKeyApi.java new file mode 100644 index 0000000000..1c31d95544 --- /dev/null +++ b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/apikey/api/ApiKeyApi.java @@ -0,0 +1,25 @@ +package io.dataease.api.permissions.apikey.api; + +import io.dataease.api.permissions.apikey.dto.ApikeyEnableEditor; +import io.dataease.api.permissions.apikey.vo.ApiKeyVO; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.List; + +public interface ApiKeyApi { + + @PostMapping("/generate") + void generate(); + + @GetMapping("/query") + List query(); + + @PostMapping("/switch") + void switchEnable(@RequestBody ApikeyEnableEditor editor); + + @PostMapping("/delete/{id}") + void delete(@PathVariable("id") Long id); +} diff --git a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/apikey/dto/ApikeyEnableEditor.java b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/apikey/dto/ApikeyEnableEditor.java new file mode 100644 index 0000000000..b0586751bd --- /dev/null +++ b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/apikey/dto/ApikeyEnableEditor.java @@ -0,0 +1,13 @@ +package io.dataease.api.permissions.apikey.dto; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class ApikeyEnableEditor implements Serializable { + + private Long id; + + private Boolean enable = false; +} diff --git a/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/apikey/vo/ApiKeyVO.java b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/apikey/vo/ApiKeyVO.java new file mode 100644 index 0000000000..04edcc568f --- /dev/null +++ b/sdk/api/api-permissions/src/main/java/io/dataease/api/permissions/apikey/vo/ApiKeyVO.java @@ -0,0 +1,22 @@ +package io.dataease.api.permissions.apikey.vo; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; + +import java.io.Serializable; + +@Data +public class ApiKeyVO implements Serializable { + + @JsonSerialize(using= ToStringSerializer.class) + private Long id; + + private String accessKey; + + private String accessSecret; + + private Boolean enable; + + private Long createTime; +}