Procházet zdrojové kódy

注释获取服务序列码

郭超 před 4 roky
rodič
revize
7569ab971c

+ 6 - 6
src/main/java/com/mooctest/controller/TaskController.java

@@ -166,7 +166,7 @@ public class TaskController {
         // 从json中获得的task数据保存到TaskDTO中返回
         TaskDTO task = taskService.getByExamIdAndCaseId(examId, caseId);
         // 返回服务序列号
-        String encodedUrl = taskService.getEncodeTaskReportUrl(examId, caseId) ;
+//        String encodedUrl = taskService.getEncodeTaskReportUrl(examId, caseId) ;
         // 返回大图信息
         model.addAttribute("dtUrl",taskService.getTaskDaPanUrl(examId,caseId));
         model.addAttribute("aggregated", aggregated);
@@ -179,7 +179,7 @@ public class TaskController {
         model.addAttribute("examId", examId);
         model.addAttribute("caseId", caseId);
         model.addAttribute("reportHost",reportHost);
-        model.addAttribute("encodedUrl",encodedUrl);
+//        model.addAttribute("encodedUrl",encodedUrl);
         return "task_detail";
     }
 
@@ -235,13 +235,13 @@ public class TaskController {
         long caseId = taskService.addCrowdTaskDefault(name, description, os, threePageUrl, fileName, collaborativeType);
         long examId = caseId;
         // 返回服务序列号
-        String encodedUrl = taskService.getEncodeTaskReportUrl(examId, caseId);
-        String writeReportUrl = taskService.getTaskReportUrl(examId, caseId);
-        encodedUrl = encodedUrl.replaceAll("%3D", "=");
+//        String encodedUrl = taskService.getEncodeTaskReportUrl(examId, caseId);
+//        String writeReportUrl = taskService.getTaskReportUrl(examId, caseId);
+//        encodedUrl = encodedUrl.replaceAll("%3D", "=");
         // 返回大图url
         String taskDaPanUrl = taskService.getTaskDaPanUrl(examId, caseId);
         taskDaPanUrl = taskDaPanUrl.replaceAll("%3D", "=");
-        TaskExtend taskExtend = new TaskExtend(examId, caseId, encodedUrl, writeReportUrl, taskDaPanUrl);
+        TaskExtend taskExtend = new TaskExtend(examId, caseId, taskDaPanUrl);
         return caseId != -1 ? new SimpleResponse(200,"创建成功", taskExtend) : new SimpleResponse(400,"创建失败");
     }
 }

+ 3 - 4
src/main/java/com/mooctest/model/TaskExtend.java

@@ -9,10 +9,9 @@ import org.springframework.data.mongodb.core.mapping.Document;
 @AllArgsConstructor
 @NoArgsConstructor
 public class TaskExtend {
-
-    private long taskId;
+    private long examId;
     private long caseId;
-    private String encodedUrl;
-    private String writeReportUrl;
+//    private String encodedUrl;
+//    private String writeReportUrl;
     private String taskDaPanUrl;
 }

+ 5 - 2
src/main/java/com/mooctest/service/TaskService.java

@@ -320,13 +320,16 @@ public class TaskService {
     }
 
     public String getEncodeTaskReportUrl(long examId,long caseId){
-        String url = HTTP + reportHost + "/report/detail/" + examId +"/" +caseId +"/userId";
+//        String url = HTTP + reportHost + "/report/detail/" + examId +"/" +caseId +"/userId";
+        String url = HTTP + "127.0.0.1:5555/report/detail/" + examId +"/" +caseId +"/userId";
         String encodedUrl = EncodeUtil.strConvertBase(url);
         return encodedUrl;
     }
 
     public String getTaskReportUrl(long examId,long caseId){
-        return HTTP + reportHost + "/report/detail/" + examId +"/" +caseId +"/userId";
+        // 修改
+//        return HTTP + reportHost + "/report/detail/" + examId +"/" +caseId +"/userId";
+        return HTTP + "127.0.0.1:5555/report/detail/" + examId +"/" +caseId +"/userId";
     }
 
     public TaskDTO getByExamIdAndCaseId(long examId, long caseId) {

+ 0 - 0
src/main/resources/apidoc/V1.0/apidoc.log.lck


+ 5 - 5
src/main/resources/templates/task_detail.html

@@ -242,10 +242,10 @@
 <!--                <i class="fa fa-coffee" style="margin-right: 3px;"></i>-->
 <!--                <span>导入数据到区块链</span>-->
 <!--            </button>-->
-            <button t id="taskUrl-btn" class="btn btn-sm btn-assign pull-right" onclick="copyUrl()">
-                <i class="fa fa-coffee" style="margin-right: 3px;"></i>
-                <span>复制服务序列号</span>
-            </button>
+<!--            <button t id="taskUrl-btn" class="btn btn-sm btn-assign pull-right" onclick="copyUrl()">-->
+<!--                <i class="fa fa-coffee" style="margin-right: 3px;"></i>-->
+<!--                <span>复制服务序列号</span>-->
+<!--            </button>-->
             <a  id="dt-btn" class="btn btn-sm btn-assign pull-right" th:href="${dtUrl}">
                 <i class="fa fa-coffee" style="margin-right: 3px;"></i>
                 <span>查看大盘</span>
@@ -375,7 +375,7 @@
 
     /*<![CDATA[*/
     var reportHost = [[${reportHost}]]
-    var encodedReportDetailUrl = [[${encodedUrl}]]
+    // var encodedReportDetailUrl = [[${encodedUrl}]]
     var caseId = [[${caseId}]]
     /*]]>*/