From 62e755d9d96751a7f035827fced931a79ef8e290 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Fri, 20 Oct 2023 15:46:06 +0800 Subject: [PATCH] =?UTF-8?q?#=E5=91=8A=E8=AD=A6=E9=85=8D=E7=BD=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alarm/config/controller/AlarmConfigController.java | 4 ++-- .../hzims/alarm/config/service/AlarmConfigService.java | 2 ++ .../config/service/impl/AlarmConfigServiceImpl.java | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/controller/AlarmConfigController.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/controller/AlarmConfigController.java index 925b8e3..4dbf5f6 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/controller/AlarmConfigController.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/controller/AlarmConfigController.java @@ -47,8 +47,8 @@ public class AlarmConfigController extends BladeController { @PostMapping("/remove") @ApiOperationSupport(order = 3) @ApiOperation(value = "逻辑删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { - return R.status(alarmConfigService.deleteLogic(Func.toLongList(ids))); + public R config_remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(alarmConfigService.config_remove(Func.toLongList(ids))); } @GetMapping("/list") diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/AlarmConfigService.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/AlarmConfigService.java index eed0c2c..2cb51d9 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/AlarmConfigService.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/AlarmConfigService.java @@ -22,4 +22,6 @@ public interface AlarmConfigService extends BaseService { boolean isSupport(String code,Integer source,Integer type,Integer operate); boolean add(AlarmConfigEntity entity); + + boolean config_remove(List longList); } \ No newline at end of file diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/impl/AlarmConfigServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/impl/AlarmConfigServiceImpl.java index 6bc0e46..084d1eb 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/impl/AlarmConfigServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/impl/AlarmConfigServiceImpl.java @@ -18,6 +18,7 @@ import org.springblade.core.mp.support.Condition; import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.StringUtil; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.List; @@ -54,6 +55,21 @@ public class AlarmConfigServiceImpl extends BaseServiceImpl ids) { + if(!this.deleteLogic(ids)){ + return false; + } + return detailService.remove(Wrappers.lambdaQuery() + .in(AlarmConfigDetailEntity::getStrategyId,ids)); + } + + /** * 分页查询 * @param page : 分页参数 * @param entity : 查询告警参数