Selaa lähdekoodia

update print api

deason 6 vuotta sitten
vanhempi
commit
5b37ea23a4

+ 4 - 4
examcloud-core-print-api-client/src/main/java/cn/com/qmth/examcloud/core/print/api/client/PrintingProjectCloudServiceClient.java

@@ -9,8 +9,8 @@ package cn.com.qmth.examcloud.core.print.api.client;
 
 import cn.com.qmth.examcloud.commons.web.redis.RedisClient;
 import cn.com.qmth.examcloud.core.print.api.PrintingProjectCloudService;
-import cn.com.qmth.examcloud.core.print.api.request.PrintingProjectListReq;
-import cn.com.qmth.examcloud.core.print.api.response.PrintingProjectListResp;
+import cn.com.qmth.examcloud.core.print.api.request.SyncPrintingProjectReq;
+import cn.com.qmth.examcloud.core.print.api.response.SyncPrintingProjectResp;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.web.client.RestTemplate;
@@ -38,8 +38,8 @@ public class PrintingProjectCloudServiceClient extends PrintCloudClientSupport i
     }
 
     @Override
-    public PrintingProjectListResp printingProjectList(PrintingProjectListReq request) {
-        return post("printing/project/list", request, PrintingProjectListResp.class);
+    public SyncPrintingProjectResp syncPrintingProject(SyncPrintingProjectReq request) {
+        return post("printing/project/sync", request, SyncPrintingProjectResp.class);
     }
 
 }

+ 7 - 3
examcloud-core-print-api/src/main/java/cn/com/qmth/examcloud/core/print/api/PrintingProjectCloudService.java

@@ -8,8 +8,8 @@
 package cn.com.qmth.examcloud.core.print.api;
 
 import cn.com.qmth.examcloud.commons.web.cloud.api.CloudService;
-import cn.com.qmth.examcloud.core.print.api.request.PrintingProjectListReq;
-import cn.com.qmth.examcloud.core.print.api.response.PrintingProjectListResp;
+import cn.com.qmth.examcloud.core.print.api.request.SyncPrintingProjectReq;
+import cn.com.qmth.examcloud.core.print.api.response.SyncPrintingProjectResp;
 
 /**
  * @author: fengdesheng
@@ -17,6 +17,10 @@ import cn.com.qmth.examcloud.core.print.api.response.PrintingProjectListResp;
  */
 public interface PrintingProjectCloudService extends CloudService {
 
-    PrintingProjectListResp printingProjectList(PrintingProjectListReq request);
+    /**
+     * 同步更新印刷项目信息
+     * 仅同步学校、考试的基本信息
+     */
+    SyncPrintingProjectResp syncPrintingProject(SyncPrintingProjectReq request);
 
 }

+ 0 - 28
examcloud-core-print-api/src/main/java/cn/com/qmth/examcloud/core/print/api/bean/PrintingProjectBean.java

@@ -1,28 +0,0 @@
-/*
- * *************************************************
- * Copyright (c) 2018 QMTH. All Rights Reserved.
- * Created by Deason on 2018-10-23 09:58:18.
- * *************************************************
- */
-
-package cn.com.qmth.examcloud.core.print.api.bean;
-
-import cn.com.qmth.examcloud.commons.web.cloud.api.JsonSerializable;
-
-/**
- * @author: fengdesheng
- * @since: 2018/10/23
- */
-public class PrintingProjectBean implements JsonSerializable {
-    private static final long serialVersionUID = 1L;
-    private Long projectId;
-
-    public Long getProjectId() {
-        return projectId;
-    }
-
-    public void setProjectId(Long projectId) {
-        this.projectId = projectId;
-    }
-
-}

+ 67 - 0
examcloud-core-print-api/src/main/java/cn/com/qmth/examcloud/core/print/api/bean/SyncPrintingProjectBean.java

@@ -0,0 +1,67 @@
+/*
+ * *************************************************
+ * Copyright (c) 2018 QMTH. All Rights Reserved.
+ * Created by Deason on 2018-10-23 09:58:18.
+ * *************************************************
+ */
+
+package cn.com.qmth.examcloud.core.print.api.bean;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.JsonSerializable;
+
+/**
+ * @author: fengdesheng
+ * @since: 2018/10/23
+ */
+public class SyncPrintingProjectBean implements JsonSerializable {
+    private static final long serialVersionUID = 1L;
+    /**
+     * 学校机构ID
+     */
+    private Long orgId;
+    /**
+     * 学校机构名称
+     */
+    private String orgName;
+    /**
+     * 考试ID
+     */
+    private Long examId;
+    /**
+     * 考试名称
+     */
+    private String examName;
+
+    public Long getOrgId() {
+        return orgId;
+    }
+
+    public void setOrgId(Long orgId) {
+        this.orgId = orgId;
+    }
+
+    public String getOrgName() {
+        return orgName;
+    }
+
+    public void setOrgName(String orgName) {
+        this.orgName = orgName;
+    }
+
+    public Long getExamId() {
+        return examId;
+    }
+
+    public void setExamId(Long examId) {
+        this.examId = examId;
+    }
+
+    public String getExamName() {
+        return examName;
+    }
+
+    public void setExamName(String examName) {
+        this.examName = examName;
+    }
+
+}

+ 6 - 5
examcloud-core-print-api/src/main/java/cn/com/qmth/examcloud/core/print/api/request/PrintingProjectListReq.java → examcloud-core-print-api/src/main/java/cn/com/qmth/examcloud/core/print/api/request/SyncPrintingProjectReq.java

@@ -8,21 +8,22 @@
 package cn.com.qmth.examcloud.core.print.api.request;
 
 import cn.com.qmth.examcloud.commons.web.cloud.api.BaseRequest;
-import cn.com.qmth.examcloud.core.print.api.bean.PrintingProjectBean;
+import cn.com.qmth.examcloud.core.print.api.bean.SyncPrintingProjectBean;
 
 /**
  * @author: fengdesheng
  * @since: 2018/10/23
  */
-public class PrintingProjectListReq extends BaseRequest {
+public class SyncPrintingProjectReq extends BaseRequest {
     private static final long serialVersionUID = 1L;
-    private PrintingProjectBean bean;
 
-    public PrintingProjectBean getBean() {
+    private SyncPrintingProjectBean bean;
+
+    public SyncPrintingProjectBean getBean() {
         return bean;
     }
 
-    public void setBean(PrintingProjectBean bean) {
+    public void setBean(SyncPrintingProjectBean bean) {
         this.bean = bean;
     }
 

+ 1 - 13
examcloud-core-print-api/src/main/java/cn/com/qmth/examcloud/core/print/api/response/PrintingProjectListResp.java → examcloud-core-print-api/src/main/java/cn/com/qmth/examcloud/core/print/api/response/SyncPrintingProjectResp.java

@@ -8,24 +8,12 @@
 package cn.com.qmth.examcloud.core.print.api.response;
 
 import cn.com.qmth.examcloud.commons.web.cloud.api.BaseResponse;
-import cn.com.qmth.examcloud.core.print.api.bean.PrintingProjectBean;
-
-import java.util.List;
 
 /**
  * @author: fengdesheng
  * @since: 2018/10/23
  */
-public class PrintingProjectListResp extends BaseResponse {
+public class SyncPrintingProjectResp extends BaseResponse {
     private static final long serialVersionUID = 1L;
-    private List<PrintingProjectBean> list;
-
-    public List<PrintingProjectBean> getList() {
-        return list;
-    }
-
-    public void setList(List<PrintingProjectBean> list) {
-        this.list = list;
-    }
 
 }