From cc47e8c518b0f928592cdfb53cb274d968fa8575 Mon Sep 17 00:00:00 2001 From: wenc000 <450292408@qq.com> Date: Mon, 20 Apr 2020 23:33:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=88=B3=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=A4=8D=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../publicareareport/PublicAreaReportAppController.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/cm/inspection/controller/app/apis/publicareareport/PublicAreaReportAppController.java b/src/main/java/com/cm/inspection/controller/app/apis/publicareareport/PublicAreaReportAppController.java index 3e51c03..9c93bdd 100644 --- a/src/main/java/com/cm/inspection/controller/app/apis/publicareareport/PublicAreaReportAppController.java +++ b/src/main/java/com/cm/inspection/controller/app/apis/publicareareport/PublicAreaReportAppController.java @@ -50,6 +50,9 @@ public class PublicAreaReportAppController extends AbstractController { if (publicAreaReportVO.getCheckType() != 1) { throw new ParamsException("检查类型错误"); } + if (!RegexUtil.isDatetime(publicAreaReportVO.getCheckDate())) { + throw new ParamsException("检查日期格式不正确"); + } return publicAreaReportService.savePublicAreaReportByToken(token, publicAreaReportVO); } @@ -80,6 +83,9 @@ public class PublicAreaReportAppController extends AbstractController { if (publicAreaReportVO.getCheckType() != 2 && publicAreaReportVO.getCheckType() != 3) { throw new ParamsException("检查类型错误"); } + if(!RegexUtil.isDatetime(publicAreaReportVO.getRecheckDate())) { + throw new ParamsException("复查日期格式不正确"); + } return publicAreaReportService.updatePublicAreaReportByToken(token, publicAreaReportId, publicAreaReportVO); }