chore[orm]: rename local variable

This commit is contained in:
godotg committed 2024-06-21 18:41:44 +08:00
1 parent ff1fcafa2d
commit 117e4388ce
1 file changed
+6 -6
+6 -6
View File
@@ -205,18 +205,18 @@ public class EntityCache<PK extends Comparable<PK>, E extends IEntity<PK>> imple
public void updateNow(E entity) { public void updateNow(E entity) {
var cachePnode = fetchCachePnode(entity, true); var cachePnode = fetchCachePnode(entity, true);
OrmContext.getAccessor().update(cachePnode.getEntity()); OrmContext.getAccessor().update(cachePnode.getEntity());
var currentTime = TimeUtils.now(); var now = TimeUtils.now();
cachePnode.setWriteToDbTime(currentTime); cachePnode.setWriteToDbTime(now);
cachePnode.setModifiedTime(currentTime); cachePnode.setModifiedTime(now);
} }
@Override @Override
public void updateUnsafeNow(E entity) { public void updateUnsafeNow(E entity) {
var cachePnode = fetchCachePnode(entity, false); var cachePnode = fetchCachePnode(entity, false);
OrmContext.getAccessor().update(cachePnode.getEntity()); OrmContext.getAccessor().update(cachePnode.getEntity());
var currentTime = TimeUtils.now(); var now = TimeUtils.now();
cachePnode.setWriteToDbTime(currentTime); cachePnode.setWriteToDbTime(now);
cachePnode.setModifiedTime(currentTime); cachePnode.setModifiedTime(now);
} }
@Override @Override