Browse Source

#告警配置修改

zhongwei
yang_shj 1 year ago
parent
commit
62e755d9d9
  1. 4
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/controller/AlarmConfigController.java
  2. 2
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/AlarmConfigService.java
  3. 16
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/impl/AlarmConfigServiceImpl.java

4
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")

2
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/AlarmConfigService.java

@ -22,4 +22,6 @@ public interface AlarmConfigService extends BaseService<AlarmConfigEntity> {
boolean isSupport(String code,Integer source,Integer type,Integer operate);
boolean add(AlarmConfigEntity entity);
boolean config_remove(List<Long> longList);
}

16
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<AlarmConfigMapper, A
}
/**
* 删除告警配置
* @param ids
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public boolean config_remove(List<Long> ids) {
if(!this.deleteLogic(ids)){
return false;
}
return detailService.remove(Wrappers.<AlarmConfigDetailEntity>lambdaQuery()
.in(AlarmConfigDetailEntity::getStrategyId,ids));
}
/**
* 分页查询
* @param page : 分页参数
* @param entity : 查询告警参数

Loading…
Cancel
Save