From fb3559aadbcd1c6ba4e309a8ea45bdbcceaae80b Mon Sep 17 00:00:00 2001 From: sunzheng Date: Thu, 26 Sep 2024 10:04:32 +0800 Subject: [PATCH] =?UTF-8?q?update:=E6=B3=95=E8=A7=84=E9=87=8A=E7=96=91?= =?UTF-8?q?=E5=BA=93=E4=BF=9D=E5=AD=98=E5=89=8D=E6=A0=A1=E9=AA=8C(?= =?UTF-8?q?=E6=9C=AA=E5=85=B7=E4=BD=93=E5=AE=9E=E7=8E=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LawsRegulationsQuestionLibraryController.java | 7 +++++++ .../service/ILawsRegulationsQuestionLibraryService.java | 7 +++++++ .../impl/LawsRegulationsQuestionLibraryServiceImpl.java | 8 ++++++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/laws/businessSupport/controller/LawsRegulationsQuestionLibraryController.java b/laws-modules/src/main/java/com/jero/modules/laws/businessSupport/controller/LawsRegulationsQuestionLibraryController.java index c7cd549e..49e7c0ee 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/businessSupport/controller/LawsRegulationsQuestionLibraryController.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/businessSupport/controller/LawsRegulationsQuestionLibraryController.java @@ -70,6 +70,13 @@ public class LawsRegulationsQuestionLibraryController { return lawsRegulationsQuestionLibraryService.add(lawsRegulationsQuestionLibrary); } + @AutoLog(value = "法规释疑库-保存/发布前校验") + @ApiOperation(value = "法规释疑库-保存/发布前校验", notes = "法规释疑库-保存/发布前校验") + @PostMapping(value = "/check") + public Result check(@RequestBody LawsRegulationsQuestionLibrary lawsRegulationsQuestionLibrary) { + return lawsRegulationsQuestionLibraryService.check(lawsRegulationsQuestionLibrary); + } + @AutoLog(value = "法规释疑库-通过id删除") @ApiOperation(value = "法规释疑库-通过id删除", notes = "法规释疑库-通过id删除") @PostMapping(value = "/delete") diff --git a/laws-modules/src/main/java/com/jero/modules/laws/businessSupport/service/ILawsRegulationsQuestionLibraryService.java b/laws-modules/src/main/java/com/jero/modules/laws/businessSupport/service/ILawsRegulationsQuestionLibraryService.java index e416d2fc..2513d885 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/businessSupport/service/ILawsRegulationsQuestionLibraryService.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/businessSupport/service/ILawsRegulationsQuestionLibraryService.java @@ -30,6 +30,13 @@ public interface ILawsRegulationsQuestionLibraryService extends IService add(LawsRegulationsQuestionLibrary lawsRegulationsQuestionLibrary); + /** + * 保存前校验 + * @param lawsRegulationsQuestionLibrary + * @return + */ + Result check(LawsRegulationsQuestionLibrary lawsRegulationsQuestionLibrary); + /** * 通过id删除 * diff --git a/laws-modules/src/main/java/com/jero/modules/laws/businessSupport/service/impl/LawsRegulationsQuestionLibraryServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/laws/businessSupport/service/impl/LawsRegulationsQuestionLibraryServiceImpl.java index 600aa2c8..1f83cc36 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/businessSupport/service/impl/LawsRegulationsQuestionLibraryServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/businessSupport/service/impl/LawsRegulationsQuestionLibraryServiceImpl.java @@ -62,6 +62,11 @@ public class LawsRegulationsQuestionLibraryServiceImpl extends ServiceImpl check(LawsRegulationsQuestionLibrary lawsRegulationsQuestionLibrary) { // 校验标准编号和条款号是否存在,并给出提示信息 String standardNumber = lawsRegulationsQuestionLibrary.getStandardNumber(); String regulationNumber = lawsRegulationsQuestionLibrary.getRegulationNumber(); @@ -77,9 +82,8 @@ public class LawsRegulationsQuestionLibraryServiceImpl extends ServiceImpl result = new Result<>(); - result.setCode(61010); // 规定一个特殊的code码,前端会根据这个code码展示提示的消息 result.setMessage(msg.toString()); - result.setSuccess(true); + result.setSuccess(false); // 前端根据success判断是否通过验证 return result; }else { return Result.OK(ResultCommon.OK);