wangwei 7 years ago
parent
commit
5940162683

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

@@ -0,0 +1,31 @@
+package cn.com.qmth.examcloud.core.basic.api.client;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+import cn.com.qmth.examcloud.core.basic.api.CommonCloudService;
+import cn.com.qmth.examcloud.core.basic.api.request.GetThirdPartyAccessInfoReq;
+import cn.com.qmth.examcloud.core.basic.api.response.GetThirdPartyAccessInfoResp;
+
+@Service
+public class CommonCloudServiceClient extends BasicCloudClientSupport
+		implements
+			CommonCloudService {
+
+	private static final long serialVersionUID = 6826389318398035229L;
+
+	@Autowired
+	private RestTemplate restTemplate;
+
+	@Override
+	protected RestTemplate getRestTemplate() {
+		return restTemplate;
+	}
+
+	@Override
+	public GetThirdPartyAccessInfoResp getThirdPartyAccessInfo(GetThirdPartyAccessInfoReq req) {
+		return post("common/getThirdPartyAccessInfo", req, GetThirdPartyAccessInfoResp.class);
+	}
+
+}

+ 26 - 0
examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/core/basic/api/CommonCloudService.java

@@ -0,0 +1,26 @@
+package cn.com.qmth.examcloud.core.basic.api;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.CloudService;
+import cn.com.qmth.examcloud.core.basic.api.request.GetThirdPartyAccessInfoReq;
+import cn.com.qmth.examcloud.core.basic.api.response.GetThirdPartyAccessInfoResp;
+
+/**
+ * 类注释
+ *
+ * @author WANGWEI
+ * @date 2018年7月5日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public interface CommonCloudService extends CloudService {
+
+	/**
+	 * 方法注释
+	 *
+	 * @author WANGWEI
+	 * @param rootOrgId
+	 * @param appId
+	 * @return
+	 */
+	GetThirdPartyAccessInfoResp getThirdPartyAccessInfo(GetThirdPartyAccessInfoReq req);
+
+}

+ 68 - 0
examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/core/basic/api/bean/ThirdPartyAccessBean.java

@@ -0,0 +1,68 @@
+package cn.com.qmth.examcloud.core.basic.api.bean;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.JsonSerializable;
+
+/**
+ * 第三方接入信息
+ *
+ * @author WANGWEI
+ * @date 2018年7月5日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public class ThirdPartyAccessBean implements JsonSerializable {
+
+	private static final long serialVersionUID = 9212710623859419481L;
+
+	/**
+	 * 顶级机构ID
+	 */
+	private Long rootOrgId;
+
+	/**
+	 * 应用ID
+	 */
+	private String appId;
+
+	/**
+	 * 密钥
+	 */
+	private String secretKey;
+
+	/**
+	 * 时间差范围
+	 */
+	private long timeRange;
+
+	public Long getRootOrgId() {
+		return rootOrgId;
+	}
+
+	public void setRootOrgId(Long rootOrgId) {
+		this.rootOrgId = rootOrgId;
+	}
+
+	public String getAppId() {
+		return appId;
+	}
+
+	public void setAppId(String appId) {
+		this.appId = appId;
+	}
+
+	public String getSecretKey() {
+		return secretKey;
+	}
+
+	public void setSecretKey(String secretKey) {
+		this.secretKey = secretKey;
+	}
+
+	public long getTimeRange() {
+		return timeRange;
+	}
+
+	public void setTimeRange(long timeRange) {
+		this.timeRange = timeRange;
+	}
+
+}

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

@@ -0,0 +1,29 @@
+package cn.com.qmth.examcloud.core.basic.api.request;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.BaseRequest;
+
+public class GetThirdPartyAccessInfoReq extends BaseRequest {
+
+	private static final long serialVersionUID = -8087094118667193680L;
+
+	private Long rootOrgId;
+
+	private String appId;
+
+	public Long getRootOrgId() {
+		return rootOrgId;
+	}
+
+	public void setRootOrgId(Long rootOrgId) {
+		this.rootOrgId = rootOrgId;
+	}
+
+	public String getAppId() {
+		return appId;
+	}
+
+	public void setAppId(String appId) {
+		this.appId = appId;
+	}
+
+}

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

@@ -0,0 +1,20 @@
+package cn.com.qmth.examcloud.core.basic.api.response;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.BaseResponse;
+import cn.com.qmth.examcloud.core.basic.api.bean.ThirdPartyAccessBean;
+
+public class GetThirdPartyAccessInfoResp extends BaseResponse {
+
+	private static final long serialVersionUID = -5868292504966057746L;
+
+	private ThirdPartyAccessBean thirdPartyAccessBean;
+
+	public ThirdPartyAccessBean getThirdPartyAccessBean() {
+		return thirdPartyAccessBean;
+	}
+
+	public void setThirdPartyAccessBean(ThirdPartyAccessBean thirdPartyAccessBean) {
+		this.thirdPartyAccessBean = thirdPartyAccessBean;
+	}
+
+}