WANG преди 6 години
родител
ревизия
3d1712dd7c

+ 8 - 0
examcloud-commons-api-client/src/main/java/cn/com/qmth/examcloud/commons/api/provider/HandleSyncCloudServiceClient.java

@@ -12,12 +12,14 @@ import cn.com.qmth.examcloud.commons.api.request.SyncExamStudentReq;
 import cn.com.qmth.examcloud.commons.api.request.SyncOrgReq;
 import cn.com.qmth.examcloud.commons.api.request.SyncSpecialtyReq;
 import cn.com.qmth.examcloud.commons.api.request.SyncStudentReq;
+import cn.com.qmth.examcloud.commons.api.request.SyncUserReq;
 import cn.com.qmth.examcloud.commons.api.response.SyncCourseResp;
 import cn.com.qmth.examcloud.commons.api.response.SyncExamResp;
 import cn.com.qmth.examcloud.commons.api.response.SyncExamStudentResp;
 import cn.com.qmth.examcloud.commons.api.response.SyncOrgResp;
 import cn.com.qmth.examcloud.commons.api.response.SyncSpecialtyResp;
 import cn.com.qmth.examcloud.commons.api.response.SyncStudentResp;
+import cn.com.qmth.examcloud.commons.api.response.SyncUserResp;
 import cn.com.qmth.examcloud.commons.web.redis.RedisClient;
 import cn.com.qmth.examcloud.commons.web.support.CloudClientSupport;
 
@@ -85,4 +87,10 @@ public class HandleSyncCloudServiceClient extends CloudClientSupport
 		return exchange(url, HttpMethod.POST, req, SyncExamResp.class);
 	}
 
+	@Override
+	public SyncUserResp syncUser(SyncUserReq req) {
+		String url = req.getUrl();
+		return exchange(url, HttpMethod.POST, req, SyncUserResp.class);
+	}
+
 }

+ 11 - 0
examcloud-commons-api/src/main/java/cn/com/qmth/examcloud/commons/api/HandleSyncCloudService.java

@@ -6,12 +6,14 @@ import cn.com.qmth.examcloud.commons.api.request.SyncExamStudentReq;
 import cn.com.qmth.examcloud.commons.api.request.SyncOrgReq;
 import cn.com.qmth.examcloud.commons.api.request.SyncSpecialtyReq;
 import cn.com.qmth.examcloud.commons.api.request.SyncStudentReq;
+import cn.com.qmth.examcloud.commons.api.request.SyncUserReq;
 import cn.com.qmth.examcloud.commons.api.response.SyncCourseResp;
 import cn.com.qmth.examcloud.commons.api.response.SyncExamResp;
 import cn.com.qmth.examcloud.commons.api.response.SyncExamStudentResp;
 import cn.com.qmth.examcloud.commons.api.response.SyncOrgResp;
 import cn.com.qmth.examcloud.commons.api.response.SyncSpecialtyResp;
 import cn.com.qmth.examcloud.commons.api.response.SyncStudentResp;
+import cn.com.qmth.examcloud.commons.api.response.SyncUserResp;
 import cn.com.qmth.examcloud.commons.web.cloud.api.CloudService;
 
 /**
@@ -77,4 +79,13 @@ public interface HandleSyncCloudService extends CloudService {
 	 */
 	SyncExamResp syncExam(SyncExamReq req);
 
+	/**
+	 * 同步用户
+	 *
+	 * @author WANGWEI
+	 * @param req
+	 * @return
+	 */
+	SyncUserResp syncUser(SyncUserReq req);
+
 }

+ 94 - 0
examcloud-commons-api/src/main/java/cn/com/qmth/examcloud/commons/api/request/SyncUserReq.java

@@ -0,0 +1,94 @@
+package cn.com.qmth.examcloud.commons.api.request;
+
+/**
+ * 类注释
+ *
+ * @author WANGWEI
+ * @date 2018年11月23日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public class SyncUserReq extends SyncBaseRequest {
+
+	private static final long serialVersionUID = 5134074720521399770L;
+
+	private Long id;
+
+	private Long rootOrgId;
+
+	private Long orgId;
+
+	private String name;
+
+	private String loginName;
+
+	private String password;
+
+	private String phoneNumber;
+
+	private Boolean enable;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Long getRootOrgId() {
+		return rootOrgId;
+	}
+
+	public void setRootOrgId(Long rootOrgId) {
+		this.rootOrgId = rootOrgId;
+	}
+
+	public Long getOrgId() {
+		return orgId;
+	}
+
+	public void setOrgId(Long orgId) {
+		this.orgId = orgId;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getLoginName() {
+		return loginName;
+	}
+
+	public void setLoginName(String loginName) {
+		this.loginName = loginName;
+	}
+
+	public String getPassword() {
+		return password;
+	}
+
+	public void setPassword(String password) {
+		this.password = password;
+	}
+
+	public String getPhoneNumber() {
+		return phoneNumber;
+	}
+
+	public void setPhoneNumber(String phoneNumber) {
+		this.phoneNumber = phoneNumber;
+	}
+
+	public Boolean getEnable() {
+		return enable;
+	}
+
+	public void setEnable(Boolean enable) {
+		this.enable = enable;
+	}
+
+}

+ 9 - 0
examcloud-commons-api/src/main/java/cn/com/qmth/examcloud/commons/api/response/SyncUserResp.java

@@ -0,0 +1,9 @@
+package cn.com.qmth.examcloud.commons.api.response;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.BaseResponse;
+
+public class SyncUserResp extends BaseResponse {
+
+	private static final long serialVersionUID = 7943381055657229504L;
+
+}