|
@@ -54,7 +54,9 @@ public class InitAddGroupAndItem implements CommandLineRunner {
|
|
weekendCriteria.andEqualTo(RemoteOpc::getCreatedFlag, YesNoEnum.YES.getValue()).andEqualTo(RemoteOpc::getPositionFlag, YesNoEnum.YES.getValue());
|
|
weekendCriteria.andEqualTo(RemoteOpc::getCreatedFlag, YesNoEnum.YES.getValue()).andEqualTo(RemoteOpc::getPositionFlag, YesNoEnum.YES.getValue());
|
|
List<RemoteOpc> list = remoteOpcMapper.selectByExample(weekend);
|
|
List<RemoteOpc> list = remoteOpcMapper.selectByExample(weekend);
|
|
List<RemoteOpc> remoteOpcList = OpcDAClient.addGroupAndItems(list);
|
|
List<RemoteOpc> remoteOpcList = OpcDAClient.addGroupAndItems(list);
|
|
- remoteOpcMapper.updateBatch(remoteOpcList);
|
|
|
|
|
|
+ if(CollectionUtils.isEmpty(remoteOpcList)){
|
|
|
|
+ remoteOpcMapper.updateBatch(remoteOpcList);
|
|
|
|
+ }
|
|
RedisUtils.del(RedisKeyConstants.redis_ok);
|
|
RedisUtils.del(RedisKeyConstants.redis_ok);
|
|
log.info("结束-初始化分组");
|
|
log.info("结束-初始化分组");
|
|
}
|
|
}
|