|
@@ -63,14 +63,14 @@ public class CommitLinkServiceImpl implements CommitLinkService {
|
|
|
//ANA 日志需要打出用户的commit信息
|
|
//ANA 日志需要打出用户的commit信息
|
|
|
JSONObject object = new JSONObject();
|
|
JSONObject object = new JSONObject();
|
|
|
try{
|
|
try{
|
|
|
- object.put("user_id",userMapper.selectIdByEmail(commit.getAuthor().getEmail()));
|
|
|
|
|
- object.put("commit_id",commit.getId());
|
|
|
|
|
- object.put("project_id",projectId);
|
|
|
|
|
|
|
+ object.put("user_id",userMapper.selectIdByEmail(commit.getAuthor().getEmail())==null?-1:userMapper.selectIdByEmail(commit.getAuthor().getEmail()));
|
|
|
|
|
+ object.put("commit_id",commit.getId()==null?-1:commit.getId());
|
|
|
|
|
+ object.put("project_id",projectId==null?-1:projectId);
|
|
|
object.put("commit_time",commit.getTimestamp());
|
|
object.put("commit_time",commit.getTimestamp());
|
|
|
object.put("message",commit.getMessage());
|
|
object.put("message",commit.getMessage());
|
|
|
- log.info("userId获取测试1 {}",UserService.loginUser().getId());
|
|
|
|
|
- }catch (Exception ignored){
|
|
|
|
|
- log.error("Error occurred while putting values into JSONObject: {}", ignored.getMessage());
|
|
|
|
|
|
|
+// log.info("userId获取测试1 {}",UserService.loginUser().getId());
|
|
|
|
|
+ }catch (Exception e){
|
|
|
|
|
+ log.error("Error occurred while putting values into JSONObject: {}", e.getMessage());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
log.info("resolving commit id : {}, title : {}, message : {}", commit.getId(), commit.getTitle(), commit.getMessage());
|
|
log.info("resolving commit id : {}, title : {}, message : {}", commit.getId(), commit.getTitle(), commit.getMessage());
|