|
|
|
@ -521,14 +521,17 @@ public class InstantServiceImpl implements InstantService { |
|
|
|
public void deleteInstant(Long id) { |
|
|
|
// 1. 校实例存在
|
|
|
|
InstantDO instant = validateInstantExists(id); |
|
|
|
// 2.1 删除实例
|
|
|
|
instantTableMapper.deleteById(id); |
|
|
|
|
|
|
|
// 2. 更新到数据库
|
|
|
|
//这一步本来不应该有,但是为了适配以前的程序,把visible变成0
|
|
|
|
InstantTableDO updateObj = new InstantTableDO(); |
|
|
|
updateObj.setMpId(id); |
|
|
|
updateObj.setVisible(0); |
|
|
|
instantTableMapper.updateById(updateObj); |
|
|
|
|
|
|
|
// 2.1 删除实例
|
|
|
|
instantTableMapper.deleteById(id); |
|
|
|
|
|
|
|
// 2.2删除warn_online_cfg表该实例相关数据
|
|
|
|
warnTableMapper.deleteByMpId(id); |
|
|
|
// 3. 记录操作日志上下文
|
|
|
|
|