feat: ApiKey配置页

This commit is contained in:
fit2cloud-chenyw 2023-11-25 11:46:21 +08:00
parent a54a126b94
commit 011bebd86e
4 changed files with 61 additions and 1 deletions

@ -1 +1 @@
Subproject commit 723bb9ff960159769673ac58982f07b18e6aa181
Subproject commit f28041745618304f6421a42d3ceaac68b96960a0

View File

@ -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<ApiKeyVO> query();
@PostMapping("/switch")
void switchEnable(@RequestBody ApikeyEnableEditor editor);
@PostMapping("/delete/{id}")
void delete(@PathVariable("id") Long id);
}

View File

@ -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;
}

View File

@ -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;
}