|
@@ -2,11 +2,13 @@ package edu.nju.controller;
|
|
|
|
|
|
import java.io.PrintWriter;
|
|
import java.io.PrintWriter;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Set;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpSession;
|
|
import javax.servlet.http.HttpSession;
|
|
|
|
|
|
import edu.nju.controller.interceptor.AuthRequired;
|
|
import edu.nju.controller.interceptor.AuthRequired;
|
|
|
|
+import edu.nju.service.AnalyzeService;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONObject;
|
|
import org.json.JSONObject;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -33,6 +35,9 @@ public class ReportController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
DotService dservice;
|
|
DotService dservice;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ AnalyzeService aservice;
|
|
|
|
|
|
//获取用户的有效信息
|
|
//获取用户的有效信息
|
|
@AuthRequired
|
|
@AuthRequired
|
|
@@ -54,6 +59,24 @@ public class ReportController {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @AuthRequired
|
|
|
|
+ @RequestMapping(value = "/reportRepoview")
|
|
|
|
+ @ResponseBody
|
|
|
|
+ public void getReportReview(String report_id, String case_take_id, HttpServletResponse response) {
|
|
|
|
+ try {
|
|
|
|
+ PrintWriter out = response.getWriter();
|
|
|
|
+ JSONObject result = new JSONObject();
|
|
|
|
+ result.put("thumsup", rservice.getAllThumsNum(report_id));
|
|
|
|
+ result.put("diss", rservice.getAllDissNum(report_id));
|
|
|
|
+ result.put("bug", aservice.getValid(case_take_id).size());
|
|
|
|
+ out.print(result);
|
|
|
|
+ out.flush();
|
|
|
|
+ out.close();
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
@RequestMapping(value = "/ThumsRank")
|
|
@RequestMapping(value = "/ThumsRank")
|
|
@ResponseBody
|
|
@ResponseBody
|