|
@@ -10,6 +10,7 @@ import java.util.Set;
|
|
import edu.nju.util.HTTP;
|
|
import edu.nju.util.HTTP;
|
|
import org.json.JSONObject;
|
|
import org.json.JSONObject;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import edu.nju.dao.BugDao;
|
|
import edu.nju.dao.BugDao;
|
|
@@ -59,6 +60,12 @@ public class SaveService {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
AnalyzeService aservice;
|
|
AnalyzeService aservice;
|
|
|
|
+
|
|
|
|
+ @Value("${main.site}")
|
|
|
|
+ private String mainSite;
|
|
|
|
+
|
|
|
|
+ @Value("${main.userInfoApi}")
|
|
|
|
+ private String mainUserInfoApi;
|
|
|
|
|
|
public String save(String case_take_id, String bug_category, String description, String img_url, String severity, String recurrent, String title, String report_id, String parent, String page, String useCase, String case_id) {
|
|
public String save(String case_take_id, String bug_category, String description, String img_url, String severity, String recurrent, String title, String report_id, String parent, String page, String useCase, String case_id) {
|
|
try {
|
|
try {
|
|
@@ -105,7 +112,7 @@ public class SaveService {
|
|
try {
|
|
try {
|
|
String name = sdao.findById(report_id);
|
|
String name = sdao.findById(report_id);
|
|
if(name.equals("null") || name.equals("")) {
|
|
if(name.equals("null") || name.equals("")) {
|
|
- String result = HTTP.sendGet("http://114.55.91.83:8191/api/user/" + worker_id, "");
|
|
|
|
|
|
+ String result = HTTP.sendGet(mainSite + mainUserInfoApi + worker_id, "");
|
|
if(result != null && !result.equals("")) {
|
|
if(result != null && !result.equals("")) {
|
|
JSONObject json = new JSONObject(result);
|
|
JSONObject json = new JSONObject(result);
|
|
sdao.save(report_id, worker_id, json.getString("name"));
|
|
sdao.save(report_id, worker_id, json.getString("name"));
|