deason hai 1 ano
pai
achega
f9831f64f5

+ 3 - 2
src/main/java/cn/com/qmth/examcloud/tool/entity/TaskEntity.java

@@ -59,7 +59,8 @@ public class TaskEntity implements Serializable {
     /**
      * 任务描述
      */
-    @Column(length = 500)
+    @Lob
+    @Column
     private String description;
 
     /**
@@ -89,7 +90,7 @@ public class TaskEntity implements Serializable {
     /**
      * 参数信息(JSON格式)
      */
-    @Column(length = 1000)
+    @Column(length = 2000)
     private String params;
 
     public Long getId() {

+ 4 - 0
src/main/java/cn/com/qmth/examcloud/tool/service/TaskService.java

@@ -104,6 +104,10 @@ public class TaskService {
             throw new StatusException("任务参数不能为空!");
         }
 
+        if (StringUtils.length(req.getParams()) > 2000) {
+            throw new StatusException("任务参数内容超长!");
+        }
+
         TaskEntity entity = new TaskEntity();
         entity.setCreationTime(new Date());
         entity.setUpdateTime(new Date());

+ 3 - 3
src/main/java/cn/com/qmth/examcloud/tool/service/config_exam_paper/ConfigExamPaperTask.java

@@ -75,9 +75,9 @@ public class ConfigExamPaperTask {
         }
 
         if (!errors.isEmpty()) {
-            // throw new RuntimeException(StringUtils.join(errors, " "));
-            log.error(StringUtils.join(errors, " "));
-            throw new RuntimeException(errors.get(0));
+            String err = StringUtils.join(errors, " \n");
+            log.error(err);
+            throw new RuntimeException(err);
         }
     }