From 186a04251f06babbb0f9f8484c8f2f2238dbfde8 Mon Sep 17 00:00:00 2001 From: wenc000 <450292408@qq.com> Date: Mon, 20 Apr 2020 19:17:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=85=AC=E5=85=B1=E5=8C=BA?= =?UTF-8?q?=E5=9F=9F=E4=B8=8A=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PublicAreaReportAppController.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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 0143fcf..3e51c03 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 @@ -10,6 +10,7 @@ import com.cm.common.pojo.ListPage; import com.cm.common.result.ErrorResult; import com.cm.common.result.SuccessResult; import com.cm.common.result.SuccessResultList; +import com.cm.common.utils.DateUtil; import com.cm.common.utils.RegexUtil; import com.cm.inspection.pojo.dtos.publicareareport.PublicAreaReportDTO; import com.cm.inspection.pojo.vos.publicareareport.PublicAreaReportVO; @@ -49,12 +50,13 @@ public class PublicAreaReportAppController extends AbstractController { if (publicAreaReportVO.getCheckType() != 1) { throw new ParamsException("检查类型错误"); } - if (!RegexUtil.isDate(publicAreaReportVO.getCheckDate())) { - throw new ParamsException("检查日期错误"); - } return publicAreaReportService.savePublicAreaReportByToken(token, publicAreaReportVO); } + public static void main(String[] args) { + System.out.println(RegexUtil.isDate("2020-04-20 19:14:10")); + } + @ApiOperation(value = "删除公共区域上报(id列表)", notes = "删除公共区域上报(id列表)接口") @ApiImplicitParams({ @ApiImplicitParam(name = "token", value = "token", paramType = "header"), @@ -78,9 +80,6 @@ public class PublicAreaReportAppController extends AbstractController { if (publicAreaReportVO.getCheckType() != 2 && publicAreaReportVO.getCheckType() != 3) { throw new ParamsException("检查类型错误"); } - if (!RegexUtil.isDate(publicAreaReportVO.getRecheckDate())) { - throw new ParamsException("检查日期错误"); - } return publicAreaReportService.updatePublicAreaReportByToken(token, publicAreaReportId, publicAreaReportVO); }