Skip to content

Commit

Permalink
fixed update cache from copy not restore
Browse files Browse the repository at this point in the history
  • Loading branch information
zjn committed Mar 10, 2022
1 parent ba6fd3f commit 41e8ef2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,10 @@ public EditResult editConf(Integer app, Integer type, Long iceId, IceConfVo conf
operateConf.setIceId(iceId);
operateConf.setConfId(operateConf.getId());
confUpdateMapper.insertSelective(operateConf);
iceServerService.updateLocalConfUpdateCache(operateConf);
} else {
confUpdateMapper.updateByPrimaryKey(operateConf);
}
iceServerService.updateLocalConfUpdateCache(operateConf);
}
}
break;
Expand Down Expand Up @@ -329,10 +329,10 @@ public EditResult editConf(Integer app, Integer type, Long iceId, IceConfVo conf
operateConf.setIceId(iceId);
operateConf.setConfId(operateConf.getId());
confUpdateMapper.insertSelective(operateConf);
iceServerService.updateLocalConfUpdateCache(operateConf);
} else {
confUpdateMapper.updateByPrimaryKey(operateConf);
}
iceServerService.updateLocalConfUpdateCache(operateConf);
}
}
break;
Expand Down Expand Up @@ -363,10 +363,10 @@ public EditResult editConf(Integer app, Integer type, Long iceId, IceConfVo conf
operateConf.setIceId(iceId);
operateConf.setConfId(operateConf.getId());
confUpdateMapper.insertSelective(operateConf);
iceServerService.updateLocalConfUpdateCache(operateConf);
} else {
confUpdateMapper.updateByPrimaryKey(operateConf);
}
iceServerService.updateLocalConfUpdateCache(operateConf);
}
}
} else if (confVo.getNextId() != null) {
Expand All @@ -382,10 +382,10 @@ public EditResult editConf(Integer app, Integer type, Long iceId, IceConfVo conf
operateConf.setIceId(iceId);
operateConf.setConfId(operateConf.getId());
confUpdateMapper.insertSelective(operateConf);
iceServerService.updateLocalConfUpdateCache(operateConf);
} else {
confUpdateMapper.updateByPrimaryKey(operateConf);
}
iceServerService.updateLocalConfUpdateCache(operateConf);
}
}
} /*else {
Expand Down Expand Up @@ -477,10 +477,10 @@ public EditResult editConf(Integer app, Integer type, Long iceId, IceConfVo conf
operateConf.setIceId(iceId);
operateConf.setConfId(operateConf.getId());
confUpdateMapper.insertSelective(operateConf);
iceServerService.updateLocalConfUpdateCache(operateConf);
} else {
confUpdateMapper.updateByPrimaryKey(operateConf);
}
iceServerService.updateLocalConfUpdateCache(operateConf);
}
}
break;
Expand Down Expand Up @@ -539,10 +539,10 @@ public EditResult editConf(Integer app, Integer type, Long iceId, IceConfVo conf
conf.setIceId(iceId);
conf.setConfId(conf.getId());
confUpdateMapper.insertSelective(conf);
iceServerService.updateLocalConfUpdateCache(conf);
} else {
confUpdateMapper.updateByPrimaryKey(conf);
}
iceServerService.updateLocalConfUpdateCache(conf);
}
} else if (confVo.getNextId() != null) {
/*更换前置节点*/
Expand All @@ -569,10 +569,10 @@ public EditResult editConf(Integer app, Integer type, Long iceId, IceConfVo conf
conf.setIceId(iceId);
conf.setConfId(conf.getId());
confUpdateMapper.insertSelective(conf);
iceServerService.updateLocalConfUpdateCache(conf);
} else {
confUpdateMapper.updateByPrimaryKey(conf);
}
iceServerService.updateLocalConfUpdateCache(conf);
}
}
} else {
Expand Down Expand Up @@ -617,10 +617,10 @@ public EditResult editConf(Integer app, Integer type, Long iceId, IceConfVo conf
operateConf.setIceId(iceId);
operateConf.setConfId(operateConf.getId());
confUpdateMapper.insertSelective(operateConf);
iceServerService.updateLocalConfUpdateCache(operateConf);
} else {
confUpdateMapper.updateByPrimaryKey(operateConf);
}
iceServerService.updateLocalConfUpdateCache(operateConf);
}
}
}
Expand Down Expand Up @@ -659,10 +659,10 @@ public EditResult editConf(Integer app, Integer type, Long iceId, IceConfVo conf
conf.setIceId(iceId);
conf.setConfId(conf.getId());
confUpdateMapper.insertSelective(conf);
iceServerService.updateLocalConfUpdateCache(conf);
} else {
confUpdateMapper.updateByPrimaryKey(conf);
}
iceServerService.updateLocalConfUpdateCache(conf);
}
}
}
Expand Down Expand Up @@ -703,10 +703,10 @@ public EditResult editConf(Integer app, Integer type, Long iceId, IceConfVo conf
conf.setIceId(iceId);
conf.setConfId(conf.getId());
confUpdateMapper.insertSelective(conf);
iceServerService.updateLocalConfUpdateCache(conf);
} else {
confUpdateMapper.updateByPrimaryKey(conf);
}
iceServerService.updateLocalConfUpdateCache(conf);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,8 @@ private IceConf newConf(IceConf conf) {
}
IceConf newConf = new IceConf();
newConf.setId(conf.getId());
newConf.setConfId(conf.getConfId());
newConf.setIceId(conf.getIceId());
newConf.setConfName(conf.getConfName());
newConf.setDebug(conf.getDebug());
newConf.setInverse(conf.getInverse());
Expand Down

0 comments on commit 41e8ef2

Please # to comment.