未验证 提交 5158f4a0 编写于 作者: W wind 提交者: GitHub

[Fix-8056] Rectify this issue about failing to edit worker groups for an...

[Fix-8056] Rectify this issue about failing to edit worker groups for an environment. (#8072) (#8078)
Co-authored-by: 大数据猿人's avatarcalvin <jianghuachinacom@163.com>
上级 0ba4263d
......@@ -366,17 +366,18 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme
env.setOperator(loginUser.getId());
env.setUpdateTime(new Date());
int update = environmentMapper.update(env, new UpdateWrapper<Environment>().lambda().eq(Environment::getCode,code));
int update = environmentMapper.update(env, new UpdateWrapper<Environment>().lambda().eq(Environment::getCode, code));
if (update > 0) {
deleteWorkerGroupSet.stream().forEach(key -> {
if (!StringUtils.isEmpty(key)) {
if (StringUtils.isNotEmpty(key)) {
relationMapper.delete(new QueryWrapper<EnvironmentWorkerGroupRelation>()
.lambda()
.eq(EnvironmentWorkerGroupRelation::getEnvironmentCode,code));
.eq(EnvironmentWorkerGroupRelation::getEnvironmentCode, code)
.eq(EnvironmentWorkerGroupRelation::getWorkerGroup, key));
}
});
addWorkerGroupSet.stream().forEach(key -> {
if (!StringUtils.isEmpty(key)) {
if (StringUtils.isNotEmpty(key)) {
EnvironmentWorkerGroupRelation relation = new EnvironmentWorkerGroupRelation();
relation.setEnvironmentCode(code);
relation.setWorkerGroup(key);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册