feat(X-Pack): 钉钉配置

This commit is contained in:
fit2cloud-chenyw 2024-02-02 17:28:18 +08:00
parent 621141d36d
commit 66bab96275
6 changed files with 112 additions and 1 deletions

@ -1 +1 @@
Subproject commit f6fb6839143be6f0741f228453d446363e3f542c
Subproject commit 374af155ed110bf7c405f78335938023f5d7872a

View File

@ -0,0 +1,37 @@
package io.dataease.api.dingtalk.api;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.dataease.api.dingtalk.dto.DingtalkEnableEditor;
import io.dataease.api.dingtalk.dto.DingtalkSettingCreator;
import io.dataease.api.dingtalk.dto.DingtalkTokenRequest;
import io.dataease.api.dingtalk.vo.DingtalkInfoVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@Tag(name = "钉钉设置")
@ApiSupport(order = 899)
public interface DingtalkApi {
@Operation(summary = "查询钉钉信息")
@GetMapping("/info")
DingtalkInfoVO info();
@Operation(summary = "保存")
@PostMapping("/create")
void save(@RequestBody DingtalkSettingCreator creator);
@Operation(summary = "钉钉token", hidden = true)
@PostMapping("/token")
String dingtalkToken(@RequestBody DingtalkTokenRequest request);
@Operation(summary = "切换开启状态")
@PostMapping("/switchEnable")
void switchEnable(@RequestBody DingtalkEnableEditor editor);
@Operation(summary = "验证可用性")
@PostMapping("/validate")
void validate(@RequestBody DingtalkSettingCreator creator);
}

View File

@ -0,0 +1,14 @@
package io.dataease.api.dingtalk.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
@Schema(description = "开启状态切换器")
@Data
public class DingtalkEnableEditor implements Serializable {
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED)
private boolean enable;
}

View File

@ -0,0 +1,23 @@
package io.dataease.api.dingtalk.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
@Schema(description = "钉钉设置构造器")
@Data
public class DingtalkSettingCreator implements Serializable {
@Schema(description = "agentId", requiredMode = Schema.RequiredMode.REQUIRED)
private String agentId;
@Schema(description = "appKey", requiredMode = Schema.RequiredMode.REQUIRED)
private String appKey;
@Schema(description = "appSecret", requiredMode = Schema.RequiredMode.REQUIRED)
private String appSecret;
@Schema(description = "回调域名", requiredMode = Schema.RequiredMode.REQUIRED)
private String callBack;
@Schema(description = "是否可用", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean enable;
@Schema(description = "是否有效")
private Boolean valid;
}

View File

@ -0,0 +1,13 @@
package io.dataease.api.dingtalk.dto;
import lombok.Data;
import java.io.Serializable;
@Data
public class DingtalkTokenRequest implements Serializable {
private String code;
private String state;
}

View File

@ -0,0 +1,24 @@
package io.dataease.api.dingtalk.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
@Schema(description = "钉钉信息")
@Data
public class DingtalkInfoVO implements Serializable {
@Schema(description = "agentId")
private String agentId;
@Schema(description = "appKey")
private String appKey;
@Schema(description = "appSecret")
private String appSecret;
@Schema(description = "回调域名")
private String callBack;
@Schema(description = "是否开启")
private Boolean enable = false;
@Schema(description = "是否可用")
private Boolean valid = false;
}