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 : 查询告警参数