Просмотр исходного кода

修复上传缺陷文档报错的问题

linyk 2 лет назад
Родитель
Сommit
634c81398e

+ 1 - 1
core/src/main/java/com/mooctest/crowd/domain/model/ExceptionLogPO.java

@@ -15,7 +15,7 @@ public class ExceptionLogPO {
     private Long id;
     @Column(name = "exception", columnDefinition = "text", nullable = false)
     private String exception;
-    @Column(name = "uri", length = 50, nullable = true)
+    @Column(name = "uri", length = 100, nullable = true)
     private String uri;
     @Column(name = "params", length = 500, nullable = true)
     private String params;

+ 3 - 0
core/src/main/java/com/mooctest/crowd/domain/repository/DefectRepo.java

@@ -112,6 +112,9 @@ public class DefectRepo implements IDefectRepo{
     }
 
     private Defect poToDO(DefectPO defectPO) {
+        if (defectPO == null) {
+            return null;
+        }
         Defect defect = Converter.convert(Defect.class, defectPO);
         if (StringUtils.isNotEmpty(defectPO.getFiles())) {
             defect.setFiles(Arrays.asList(defectPO.getFiles().split(",")));