|
@@ -5,6 +5,7 @@ import java.io.PrintWriter;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
+import edu.nju.util.BlockChainAspect;
|
|
|
import org.json.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -26,6 +27,9 @@ public class UploadController {
|
|
|
|
|
|
@Autowired
|
|
|
CTBService ctbservice;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ BlockChainAspect blockChainAspect;
|
|
|
|
|
|
//上传新的Bug报告
|
|
|
@RequestMapping(value = "/submit", method = RequestMethod.POST)
|
|
@@ -36,6 +40,7 @@ public class UploadController {
|
|
|
String id = saveservice.save(case_take_id, bug_category, description, img_url, severity, recurrent, title, report_id, parent, page, useCase, case_id);
|
|
|
// System.out.println(useCase);
|
|
|
if(!useCase.equals("null") && !id.equals("")) {flag = ctbservice.save(useCase, id, case_take_id, report_id);}
|
|
|
+ boolean uploadBlockResult=blockChainAspect.uploadTestReportInfoToBlockChain(id);
|
|
|
if(flag && !id.equals("")) {
|
|
|
result.put("status", "200");
|
|
|
result.put("id", id);
|