fix(sj_1.0.0): 修复组更新失败问题

This commit is contained in:
opensnail 2024-06-07 22:51:01 +08:00
parent a8a423c416
commit bbeb24aac2

View File

@ -138,8 +138,6 @@ public class GroupConfigServiceImpl implements GroupConfigService {
groupConfig.setDescription(Optional.ofNullable(groupConfigRequestVO.getDescription()).orElse(StrUtil.EMPTY)); groupConfig.setDescription(Optional.ofNullable(groupConfigRequestVO.getDescription()).orElse(StrUtil.EMPTY));
// 使用@TableField(value = "version", update= "%s+1") 进行更新version, 这里必须初始化一个值 // 使用@TableField(value = "version", update= "%s+1") 进行更新version, 这里必须初始化一个值
groupConfig.setVersion(1); groupConfig.setVersion(1);
// 不允许更新组
groupConfig.setGroupName(null);
// 不允许更新token // 不允许更新token
groupConfig.setToken(null); groupConfig.setToken(null);
Assert.isTrue(tablePartitionList.contains(groupConfigRequestVO.getGroupPartition()), Assert.isTrue(tablePartitionList.contains(groupConfigRequestVO.getGroupPartition()),
@ -150,6 +148,8 @@ public class GroupConfigServiceImpl implements GroupConfigService {
// 校验retry_task_x和retry_dead_letter_x是否存在 // 校验retry_task_x和retry_dead_letter_x是否存在
checkGroupPartition(groupConfig, namespaceId); checkGroupPartition(groupConfig, namespaceId);
// 不允许更新组
groupConfig.setGroupName(null);
Assert.isTrue(1 == groupConfigAccess.update(groupConfig, Assert.isTrue(1 == groupConfigAccess.update(groupConfig,
new LambdaUpdateWrapper<GroupConfig>() new LambdaUpdateWrapper<GroupConfig>()
.eq(GroupConfig::getNamespaceId, namespaceId) .eq(GroupConfig::getNamespaceId, namespaceId)