修复删除用户队列时,没有删除用户添加时对应的消费者组信息.造成再添加用户队列信息时,消费者组信息重复的BUG
正在显示
1 个修改的文件
包含
4 行增加
和
0 行删除
| @@ -70,6 +70,8 @@ public class BusQueueServiceImpl implements BusQueueService { | @@ -70,6 +70,8 @@ public class BusQueueServiceImpl implements BusQueueService { | ||
| 70 | BusQueue busQueue = selectByPrimaryKey(split[i]); | 70 | BusQueue busQueue = selectByPrimaryKey(split[i]); | 
| 71 | // 删除数据库中的该队列 | 71 | // 删除数据库中的该队列 | 
| 72 | int num = busQueueMapper.deleteByPrimaryKey(split[i]); | 72 | int num = busQueueMapper.deleteByPrimaryKey(split[i]); | 
| 73 | + // 删除数据库中队列绑定的消费者组 | ||
| 74 | + consumerGroupMapper.deleteByPrimaryKey(id); | ||
| 73 | // 删除MQ服务器上的队列 | 75 | // 删除MQ服务器上的队列 | 
| 74 | //deleteQueue(busQueue); | 76 | //deleteQueue(busQueue); | 
| 75 | // 级联删除数据库中与队列有关的配置关系 | 77 | // 级联删除数据库中与队列有关的配置关系 | 
| @@ -86,6 +88,8 @@ public class BusQueueServiceImpl implements BusQueueService { | @@ -86,6 +88,8 @@ public class BusQueueServiceImpl implements BusQueueService { | ||
| 86 | } else { | 88 | } else { | 
| 87 | BusQueue busQueue = selectByPrimaryKey(id); | 89 | BusQueue busQueue = selectByPrimaryKey(id); | 
| 88 | kafkaService.delTopic(busQueue.getQueueName()); | 90 | kafkaService.delTopic(busQueue.getQueueName()); | 
| 91 | + //删除数据库中的对应的消费者组 | ||
| 92 | + consumerGroupMapper.deleteByPrimaryKey(id); | ||
| 89 | // 删除数据库中的该队列 | 93 | // 删除数据库中的该队列 | 
| 90 | int num = busQueueMapper.deleteByPrimaryKey(id); | 94 | int num = busQueueMapper.deleteByPrimaryKey(id); | 
| 91 | // 删除MQ服务器上的队列 | 95 | // 删除MQ服务器上的队列 | 
- 
请 注册 或 登录 后发表评论