Prechádzať zdrojové kódy

从后端获取三级页面URL

xujiawei 4 rokov pred
rodič
commit
6590b4dbcf

+ 6 - 0
src/main/java/edu/nju/controller/ExtraController.java

@@ -492,4 +492,10 @@ public class ExtraController {
 		return uploadUrl;
 	}
 
+	@RequestMapping(value = "/pageUrl")
+	@ResponseBody
+	public String getPageUrl(String caseId){
+		return extraService.getPageUrl(caseId);
+	}
+
 }

+ 11 - 1
src/main/java/edu/nju/service/ExtraService.java

@@ -15,7 +15,9 @@ import edu.nju.util.*;
 import org.json.JSONArray;
 import org.json.JSONObject;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
+import org.springframework.web.bind.annotation.ResponseBody;
 
 @Service
 public class ExtraService {
@@ -43,7 +45,11 @@ public class ExtraService {
 
 	@Autowired
 	CrowdSourceToReviewPaperDao crowdSourceToReviewPaperDao;
-	
+
+	@Value("${sanjiPageUrl}")
+	private String pageUrl;
+
+
 	//测试用例相关
 	public String saveTestCase(String report_id, String name, String front, String behind, String description) {
 		TestCase testCase = new TestCase(name, front, behind, description, report_id, Long.toString(System.currentTimeMillis()));
@@ -276,6 +282,10 @@ public class ExtraService {
 		return null;
 	}
 
+	public String getPageUrl(String caseId){
+		return pageUrl+caseId+".json";
+	}
+