临时提交

This commit is contained in:
648540858
2024-08-15 17:45:24 +08:00
parent 1cbd8d677c
commit abed3ecbec
32 changed files with 472 additions and 971 deletions

View File

@@ -64,25 +64,25 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage {
}
PlatformCatch parentPlatformCatch = redisCatchStorage.queryPlatformCatchInfo(parentPlatform.getServerGBId()); // .getDeviceGBId());
if (parentPlatform.getId() == null ) {
result = platformMapper.addParentPlatform(parentPlatform);
result = platformMapper.add(parentPlatform);
if (parentPlatformCatch == null) {
parentPlatformCatch = new PlatformCatch();
parentPlatformCatch.setParentPlatform(parentPlatform);
parentPlatformCatch.setPlatform(parentPlatform);
parentPlatformCatch.setId(parentPlatform.getServerGBId());
}
}else {
if (parentPlatformCatch == null) { // serverGBId 已变化
Platform parentPlatById = platformMapper.getParentPlatById(parentPlatform.getId());
Platform parentPlatById = platformMapper.query(parentPlatform.getId());
// 使用旧的查出缓存ID
parentPlatformCatch = new PlatformCatch();
parentPlatformCatch.setId(parentPlatform.getServerGBId());
redisCatchStorage.delPlatformCatchInfo(parentPlatById.getServerGBId());
}
result = platformMapper.updateParentPlatform(parentPlatform);
result = platformMapper.update(parentPlatform);
}
// 更新缓存
parentPlatformCatch.setParentPlatform(parentPlatform);
parentPlatformCatch.setPlatform(parentPlatform);
redisCatchStorage.updatePlatformCatchInfo(parentPlatformCatch);
return result > 0;