Przeglądaj źródła

merge from release_v4.1.2

deason 3 lat temu
rodzic
commit
fdce5f008d

+ 18 - 0
examcloud-core-basic-api-client/src/main/java/cn/com/qmth/examcloud/core/basic/api/client/CryptoConfigCloudServiceClient.java

@@ -0,0 +1,18 @@
+package cn.com.qmth.examcloud.core.basic.api.client;
+
+import cn.com.qmth.examcloud.core.basic.api.CryptoConfigCloudService;
+import cn.com.qmth.examcloud.core.basic.api.request.CheckCryptoConfigReq;
+import cn.com.qmth.examcloud.core.basic.api.response.CheckCryptoConfigResp;
+import org.springframework.stereotype.Service;
+
+@Service
+public class CryptoConfigCloudServiceClient extends AbstractCloudClientSupport implements CryptoConfigCloudService {
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public CheckCryptoConfigResp checkCryptoConfig(CheckCryptoConfigReq req) {
+        return post("crypto/config/check", req, CheckCryptoConfigResp.class);
+    }
+
+}

+ 17 - 0
examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/core/basic/api/CryptoConfigCloudService.java

@@ -0,0 +1,17 @@
+package cn.com.qmth.examcloud.core.basic.api;
+
+import cn.com.qmth.examcloud.api.commons.CloudService;
+import cn.com.qmth.examcloud.core.basic.api.request.CheckCryptoConfigReq;
+import cn.com.qmth.examcloud.core.basic.api.response.CheckCryptoConfigResp;
+
+/**
+ * 加密方案组合配置相关接口
+ */
+public interface CryptoConfigCloudService extends CloudService {
+
+    /**
+     * 判断某个组合是否启用
+     */
+    CheckCryptoConfigResp checkCryptoConfig(CheckCryptoConfigReq req);
+
+}

+ 29 - 0
examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/core/basic/api/request/CheckCryptoConfigReq.java

@@ -0,0 +1,29 @@
+package cn.com.qmth.examcloud.core.basic.api.request;
+
+import cn.com.qmth.examcloud.api.commons.exchange.BaseRequest;
+import io.swagger.annotations.ApiModelProperty;
+
+public class CheckCryptoConfigReq extends BaseRequest {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "组合")
+    private String combination;
+
+    public CheckCryptoConfigReq(String combination) {
+        this.combination = combination;
+    }
+
+    public CheckCryptoConfigReq() {
+
+    }
+
+    public String getCombination() {
+        return combination;
+    }
+
+    public void setCombination(String combination) {
+        this.combination = combination;
+    }
+
+}

+ 29 - 0
examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/core/basic/api/response/CheckCryptoConfigResp.java

@@ -0,0 +1,29 @@
+package cn.com.qmth.examcloud.core.basic.api.response;
+
+import cn.com.qmth.examcloud.api.commons.exchange.BaseResponse;
+import io.swagger.annotations.ApiModelProperty;
+
+public class CheckCryptoConfigResp extends BaseResponse {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "是否启用")
+    private boolean enable;
+
+    public CheckCryptoConfigResp(boolean enable) {
+        this.enable = enable;
+    }
+
+    public CheckCryptoConfigResp() {
+
+    }
+
+    public boolean isEnable() {
+        return enable;
+    }
+
+    public void setEnable(boolean enable) {
+        this.enable = enable;
+    }
+
+}