forked from github/dataease
Merge pull request #8021 from dataease/pr@dev-v2@feat_wecom_config
feat(X-Pack): 企业微信配置
This commit is contained in:
commit
f9bc0f84b7
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
|||||||
Subproject commit 122c156b582aed6fb35b18e2292f93f80cd722e7
|
Subproject commit 25c0bb1ec2569f54aed498da03732637cbdda727
|
@ -0,0 +1,37 @@
|
|||||||
|
package io.dataease.api.wecom.api;
|
||||||
|
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||||
|
import io.dataease.api.wecom.dto.WecomCreator;
|
||||||
|
import io.dataease.api.wecom.dto.WecomEnableEditor;
|
||||||
|
import io.dataease.api.wecom.dto.WecomTokenRequest;
|
||||||
|
import io.dataease.api.wecom.vo.WecomInfoVO;
|
||||||
|
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 WecomApi {
|
||||||
|
|
||||||
|
@Operation(summary = "查询企微信息")
|
||||||
|
@GetMapping("/info")
|
||||||
|
WecomInfoVO info();
|
||||||
|
|
||||||
|
@Operation(summary = "保存")
|
||||||
|
@PostMapping("/create")
|
||||||
|
void save(@RequestBody WecomCreator creator);
|
||||||
|
|
||||||
|
@Operation(summary = "企微token", hidden = true)
|
||||||
|
@PostMapping("/token")
|
||||||
|
String wecomToken(@RequestBody WecomTokenRequest request);
|
||||||
|
|
||||||
|
@Operation(summary = "切换开启状态")
|
||||||
|
@PostMapping("/switchEnable")
|
||||||
|
void switchEnable(@RequestBody WecomEnableEditor editor);
|
||||||
|
|
||||||
|
@Operation(summary = "验证可用性")
|
||||||
|
@PostMapping("/validate")
|
||||||
|
void validate(@RequestBody WecomCreator creator);
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package io.dataease.api.wecom.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class WecomCreator implements Serializable {
|
||||||
|
@Schema(description = "corpId", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
private String corpId;
|
||||||
|
@Schema(description = "agentId", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
private String agentId;
|
||||||
|
@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 = false;
|
||||||
|
@Schema(description = "是否可用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
private Boolean valid = false;
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package io.dataease.api.wecom.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Schema(description = "开启状态切换器")
|
||||||
|
@Data
|
||||||
|
public class WecomEnableEditor implements Serializable {
|
||||||
|
|
||||||
|
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
private boolean enable;
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package io.dataease.api.wecom.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class WecomTokenRequest implements Serializable {
|
||||||
|
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
private String state;
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package io.dataease.api.wecom.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Schema(description = "企微信息")
|
||||||
|
@Data
|
||||||
|
public class WecomInfoVO implements Serializable {
|
||||||
|
@Schema(description = "corpId")
|
||||||
|
private String corpId;
|
||||||
|
@Schema(description = "agentId")
|
||||||
|
private String agentId;
|
||||||
|
@Schema(description = "appSecret")
|
||||||
|
private String appSecret;
|
||||||
|
@Schema(description = "回调域名")
|
||||||
|
private String callBack;
|
||||||
|
@Schema(description = "是否开启")
|
||||||
|
private Boolean enable = false;
|
||||||
|
@Schema(description = "是否可用")
|
||||||
|
private Boolean valid = false;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user