时间戳格式复查

This commit is contained in:
wenc000 2020-04-20 23:33:50 +08:00
parent 186a04251f
commit cc47e8c518

View File

@ -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);
}