Sfoglia il codice sorgente

Merge branch 'dev_v3.0.0' of http://git.qmth.com.cn/wangliang/distributed-print-service into dev_v3.0.0

xiaof 3 anni fa
parent
commit
5025b0e14e

+ 2 - 2
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/ConvertUtil.java

@@ -76,12 +76,12 @@ public class ConvertUtil {
         String[] arr = time.split("-");
         if (arr.length != 2) {
             // 不能使用'-'拆分成两个时间的报错
-            throw ExceptionResultEnum.ERROR.exception("提供的时间格式异常 时间 : " + time + " 应该使用如下的格式 '考试时间' :18:00-20:00");
+            throw ExceptionResultEnum.ERROR.exception("提供的时间格式异常 【考试时间】:" + time + " 应该使用如下的格式【考试时间】:18:00-20:00");
         }
         String startTimeStr = date + " " + arr[0];
         String endTimeStr = date + " " + arr[1];
         if (Objects.isNull(DateDisposeUtils.parseDate(startTimeStr)) || Objects.isNull(DateDisposeUtils.parseDate(endTimeStr))) {
-            throw ExceptionResultEnum.ERROR.exception("提供的日期时间格式异常(请使用'-'隔开) \n【考试日期】 : " + date + "\n应该使用如下的格式 '考试日期' :2021-09-01");
+            throw ExceptionResultEnum.ERROR.exception("提供的日期时间格式异常 \n【考试日期】:" + date + " 应该使用如下的格式【考试日期】:2021-09-01 或 2021/09/01 或 2021.09.01" + "\n【考试时间】:" + time + " 应该使用如下的格式【考试时间】:18:00-20:00");
         }
         long startTime = DateDisposeUtils.parseDate(startTimeStr).getTime();
         long endTime = DateDisposeUtils.parseDate(endTimeStr).getTime();