From 863345ee917ec2379fd08e51ee748db7bb11b9ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Tue, 30 Jul 2024 15:15:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B4=E5=BA=A6=E6=AF=94=E8=B5=9B=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E9=80=9A=E8=BF=87=E5=90=8E=E4=B8=8D=E5=8F=AF=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=92=8C=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AnnualCompPointController.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java index 9c5444f6..1c33d0e2 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java @@ -304,7 +304,12 @@ public class AnnualCompPointController extends JeecgController edit(@RequestBody AnnualCompPoint annualCompPoint) { - boolean isUpdate = annualCompPointService.updateById(annualCompPoint); + boolean isUpdate ; + if(annualCompPoint.getAnnualCompState().equals("0") && annualCompPoint.getAnnualCompState().equals("4") ){ + isUpdate = annualCompPointService.updateById(annualCompPoint); + } else { + return Result.error("当前状态不可修改"); + } if (!isUpdate){ return Result.error("编辑失败!"); } @@ -322,7 +327,13 @@ public class AnnualCompPointController extends JeecgController delete(@RequestParam(name = "id", required = true) String id) { - annualCompPointService.removeById(id); + AnnualCompPoint annualCompPoint =annualCompPointService.getById(id); + if(annualCompPoint.getAnnualCompState().equals("0") && annualCompPoint.getAnnualCompState().equals("4") ) { + System.out.println(id); + annualCompPointService.removeById(id); + }else { + return Result.error("当前状态不可删除"); + } return Result.OK("删除成功!"); } /**