deason пре 4 година
родитељ
комит
908e99febd

+ 46 - 56
examcloud-core-basic-api-client/src/main/java/cn/com/qmth/examcloud/core/basic/api/client/StudentCloudServiceClient.java

@@ -1,63 +1,53 @@
 package cn.com.qmth.examcloud.core.basic.api.client;
 
-import org.springframework.stereotype.Service;
-
 import cn.com.qmth.examcloud.core.basic.api.StudentCloudService;
-import cn.com.qmth.examcloud.core.basic.api.request.CountStudentReq;
-import cn.com.qmth.examcloud.core.basic.api.request.GetStudentListByIdsReq;
-import cn.com.qmth.examcloud.core.basic.api.request.GetStudentReq;
-import cn.com.qmth.examcloud.core.basic.api.request.SaveStudentReq;
-import cn.com.qmth.examcloud.core.basic.api.request.UnbindStudentCodeReq;
-import cn.com.qmth.examcloud.core.basic.api.request.UpdatePasswordReq;
-import cn.com.qmth.examcloud.core.basic.api.request.UpdateStudentStatusReq;
-import cn.com.qmth.examcloud.core.basic.api.response.CountStudentResp;
-import cn.com.qmth.examcloud.core.basic.api.response.GetStudentListByIdsResp;
-import cn.com.qmth.examcloud.core.basic.api.response.GetStudentResp;
-import cn.com.qmth.examcloud.core.basic.api.response.SaveStudentResp;
-import cn.com.qmth.examcloud.core.basic.api.response.UnbindStudentCodeResp;
-import cn.com.qmth.examcloud.core.basic.api.response.UpdatePasswordResp;
-import cn.com.qmth.examcloud.core.basic.api.response.UpdateStudentStatusResp;
+import cn.com.qmth.examcloud.core.basic.api.request.*;
+import cn.com.qmth.examcloud.core.basic.api.response.*;
+import org.springframework.stereotype.Service;
 
 @Service
-public class StudentCloudServiceClient extends AbstractCloudClientSupport
-		implements
-			StudentCloudService {
-
-	private static final long serialVersionUID = 7669672850482842766L;
-
-	@Override
-	public SaveStudentResp saveStudent(SaveStudentReq req) {
-		return post("student/saveStudent", req, SaveStudentResp.class);
-	}
-
-	@Override
-	public GetStudentResp getStudent(GetStudentReq req) {
-		return post("student/getStudent", req, GetStudentResp.class);
-	}
-
-	@Override
-	public UnbindStudentCodeResp unbindStudentCode(UnbindStudentCodeReq req) {
-		return post("student/unbindStudentCode", req, UnbindStudentCodeResp.class);
-	}
-
-	@Override
-	public UpdatePasswordResp updatePassword(UpdatePasswordReq req) {
-		return post("student/updatePassword", req, UpdatePasswordResp.class);
-	}
-
-	@Override
-	public UpdateStudentStatusResp updateStudentStatus(UpdateStudentStatusReq req) {
-		return post("student/updateStudentStatus", req, UpdateStudentStatusResp.class);
-	}
-
-	@Override
-	public CountStudentResp countStudent(CountStudentReq req) {
-		return post("student/countStudent", req, CountStudentResp.class);
-	}
-
-	@Override
-	public GetStudentListByIdsResp getStudentListByIds(GetStudentListByIdsReq req) {
-		return post("student/getStudentListByIds", req, GetStudentListByIdsResp.class);
-	}
+public class StudentCloudServiceClient extends AbstractCloudClientSupport implements StudentCloudService {
+
+    private static final long serialVersionUID = 7669672850482842766L;
+
+    @Override
+    public SaveStudentResp saveStudent(SaveStudentReq req) {
+        return post("student/saveStudent", req, SaveStudentResp.class);
+    }
+
+    @Override
+    public GetStudentResp getStudent(GetStudentReq req) {
+        return post("student/getStudent", req, GetStudentResp.class);
+    }
+
+    @Override
+    public UnbindStudentCodeResp unbindStudentCode(UnbindStudentCodeReq req) {
+        return post("student/unbindStudentCode", req, UnbindStudentCodeResp.class);
+    }
+
+    @Override
+    public UpdatePasswordResp updatePassword(UpdatePasswordReq req) {
+        return post("student/updatePassword", req, UpdatePasswordResp.class);
+    }
+
+    @Override
+    public UpdateStudentStatusResp updateStudentStatus(UpdateStudentStatusReq req) {
+        return post("student/updateStudentStatus", req, UpdateStudentStatusResp.class);
+    }
+
+    @Override
+    public CountStudentResp countStudent(CountStudentReq req) {
+        return post("student/countStudent", req, CountStudentResp.class);
+    }
+
+    @Override
+    public GetStudentListByIdsResp getStudentListByIds(GetStudentListByIdsReq req) {
+        return post("student/getStudentListByIds", req, GetStudentListByIdsResp.class);
+    }
+
+    @Override
+    public GetStudentMapsResp getStudentMaps(GetStudentMapsReq req) {
+        return post("student/getStudentMaps", req, GetStudentMapsResp.class);
+    }
 
 }

+ 54 - 65
examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/core/basic/api/StudentCloudService.java

@@ -1,84 +1,73 @@
 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.CountStudentReq;
-import cn.com.qmth.examcloud.core.basic.api.request.GetStudentListByIdsReq;
-import cn.com.qmth.examcloud.core.basic.api.request.GetStudentReq;
-import cn.com.qmth.examcloud.core.basic.api.request.SaveStudentReq;
-import cn.com.qmth.examcloud.core.basic.api.request.UnbindStudentCodeReq;
-import cn.com.qmth.examcloud.core.basic.api.request.UpdatePasswordReq;
-import cn.com.qmth.examcloud.core.basic.api.request.UpdateStudentStatusReq;
-import cn.com.qmth.examcloud.core.basic.api.response.CountStudentResp;
-import cn.com.qmth.examcloud.core.basic.api.response.GetStudentListByIdsResp;
-import cn.com.qmth.examcloud.core.basic.api.response.GetStudentResp;
-import cn.com.qmth.examcloud.core.basic.api.response.SaveStudentResp;
-import cn.com.qmth.examcloud.core.basic.api.response.UnbindStudentCodeResp;
-import cn.com.qmth.examcloud.core.basic.api.response.UpdatePasswordResp;
-import cn.com.qmth.examcloud.core.basic.api.response.UpdateStudentStatusResp;
+import cn.com.qmth.examcloud.core.basic.api.request.*;
+import cn.com.qmth.examcloud.core.basic.api.response.*;
 
 /**
  * 学生接口服务
- * 
+ *
  * @author chenken
  * @date 2018年5月4日 下午5:10:40
  * @company QMTH
- * @description StudentCloudService.java
  */
 public interface StudentCloudService extends CloudService {
 
-	/**
-	 * 插入或更新学生
-	 *
-	 * @author WANGWEI
-	 * @param req
-	 */
-	SaveStudentResp saveStudent(SaveStudentReq req);
+    /**
+     * 插入或更新学生
+     *
+     * @param req
+     * @author WANGWEI
+     */
+    SaveStudentResp saveStudent(SaveStudentReq req);
 
-	/**
-	 * 查询学生信息
-	 *
-	 * @author WANGWEI
-	 * @param req
-	 * @return
-	 */
-	GetStudentResp getStudent(GetStudentReq req);
+    /**
+     * 查询学生信息
+     *
+     * @param req
+     * @return
+     * @author WANGWEI
+     */
+    GetStudentResp getStudent(GetStudentReq req);
 
-	/**
-	 * 解绑学号
-	 *
-	 * @author WANGWEI
-	 * @param req
-	 * @return
-	 */
-	UnbindStudentCodeResp unbindStudentCode(UnbindStudentCodeReq req);
+    /**
+     * 解绑学号
+     *
+     * @param req
+     * @return
+     * @author WANGWEI
+     */
+    UnbindStudentCodeResp unbindStudentCode(UnbindStudentCodeReq req);
 
-	/**
-	 * 修改密码
-	 *
-	 * @author WANGWEI
-	 * @param req
-	 * @return
-	 */
-	UpdatePasswordResp updatePassword(UpdatePasswordReq req);
+    /**
+     * 修改密码
+     *
+     * @param req
+     * @return
+     * @author WANGWEI
+     */
+    UpdatePasswordResp updatePassword(UpdatePasswordReq req);
 
-	/**
-	 * 更新学生状态
-	 *
-	 * @author WANGWEI
-	 * @param req
-	 * @return
-	 */
-	UpdateStudentStatusResp updateStudentStatus(UpdateStudentStatusReq req);
+    /**
+     * 更新学生状态
+     *
+     * @param req
+     * @return
+     * @author WANGWEI
+     */
+    UpdateStudentStatusResp updateStudentStatus(UpdateStudentStatusReq req);
 
-	/**
-	 * 统计学生
-	 *
-	 * @author WANGWEI
-	 * @param req
-	 * @return
-	 */
-	CountStudentResp countStudent(CountStudentReq req);
+    /**
+     * 统计学生
+     *
+     * @param req
+     * @return
+     * @author WANGWEI
+     */
+    CountStudentResp countStudent(CountStudentReq req);
 
-	GetStudentListByIdsResp getStudentListByIds(GetStudentListByIdsReq req);
+    GetStudentListByIdsResp getStudentListByIds(GetStudentListByIdsReq req);
 
-}
+    GetStudentMapsResp getStudentMaps(GetStudentMapsReq req);
+
+}

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

@@ -0,0 +1,21 @@
+package cn.com.qmth.examcloud.core.basic.api.request;
+
+import cn.com.qmth.examcloud.api.commons.exchange.BaseRequest;
+
+import java.util.Set;
+
+public class GetStudentMapsReq extends BaseRequest {
+
+    private static final long serialVersionUID = 8427775553678919877L;
+
+    private Set<Long> studentIds;
+
+    public Set<Long> getStudentIds() {
+        return studentIds;
+    }
+
+    public void setStudentIds(Set<Long> studentIds) {
+        this.studentIds = studentIds;
+    }
+
+}

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

@@ -0,0 +1,22 @@
+package cn.com.qmth.examcloud.core.basic.api.response;
+
+import cn.com.qmth.examcloud.api.commons.exchange.BaseResponse;
+import cn.com.qmth.examcloud.core.basic.api.bean.StudentBean;
+
+import java.util.Map;
+
+public class GetStudentMapsResp extends BaseResponse {
+
+    private static final long serialVersionUID = 8427775553678919877L;
+
+    private Map<Long, StudentBean> studentMaps;
+
+    public Map<Long, StudentBean> getStudentMaps() {
+        return studentMaps;
+    }
+
+    public void setStudentMaps(Map<Long, StudentBean> studentMaps) {
+        this.studentMaps = studentMaps;
+    }
+
+}