Commit 013b4523 authored by 叶剑飞's avatar 叶剑飞

FIX BUG

parent fd749133
...@@ -56,6 +56,10 @@ public class GitlabMergeRequestService { ...@@ -56,6 +56,10 @@ public class GitlabMergeRequestService {
List<Long> mqidList = mqList.stream().map(GitlabMergeRequest::getId).collect(Collectors.toList()); List<Long> mqidList = mqList.stream().map(GitlabMergeRequest::getId).collect(Collectors.toList());
if (mqidList.isEmpty()) {
System.out.print("mqidList 为空!");
return;
}
List<Object[]> notes = gitlabMergeRequestDao.listNoteByMqid(mqidList); List<Object[]> notes = gitlabMergeRequestDao.listNoteByMqid(mqidList);
Map<Long, List<Object[]>> mapNotes = notes.stream().collect(Collectors.groupingBy(note -> { Map<Long, List<Object[]>> mapNotes = notes.stream().collect(Collectors.groupingBy(note -> {
return StringUtil.getNullLong(note[1]); return StringUtil.getNullLong(note[1]);
...@@ -101,13 +105,11 @@ public class GitlabMergeRequestService { ...@@ -101,13 +105,11 @@ public class GitlabMergeRequestService {
public static Long getMaxMqid() { public static Long getMaxMqid() {
String url = "http://weixt.spacetech.com.cn:9090/integratest/githook/getmaxmqid"; String url = "http://10.10.10.61:9080/integtest/githook/getmaxmqid";
try { try {
Response resp = FastHttpClient.get().url(url).build().execute(); Response resp = FastHttpClient.get().url(url).build().execute();
Long maxid = StringUtil.getNullLong(resp.body().string()); return StringUtil.getNullLong(resp.body().string());
System.out.println("max id=" + maxid);
return maxid;
} catch (Exception e) { } catch (Exception e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
...@@ -118,7 +120,7 @@ public class GitlabMergeRequestService { ...@@ -118,7 +120,7 @@ public class GitlabMergeRequestService {
public static void postHttp(JSONObject param) { public static void postHttp(JSONObject param) {
System.out.println("往服务器同步违规信息:" + param.toJSONString()); System.out.println("往服务器同步违规信息:" + param.toJSONString());
String url = "http://weixt.spacetech.com.cn:9090/integratest/githook/savemq"; String url = "http://10.10.10.61:9080/integtest/githook/savemq";
Map<String, String> paramMap = new HashMap<String, String>(); Map<String, String> paramMap = new HashMap<String, String>();
paramMap.put("paramsStr", param.toJSONString()); paramMap.put("paramsStr", param.toJSONString());
try { try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment