Merge branch 'dev' into release

This commit is contained in:
Xu Chang 2025-05-08 16:25:13 +08:00
commit f8fb67d9ad
4 changed files with 41 additions and 32 deletions

View File

@ -1902,16 +1902,19 @@ export default class TreeStore extends CascadeStore {
}, context, option2);
this.addToOperationResult(result, entity, 'create');
}
else if (this.store[entity][id].$current?.[UpdateAtAttribute] <= d[entity][id][UpdateAtAttribute]) {
this.updateAbjointRow(entity, {
id: 'dummy',
action: 'update',
data: d[entity][id],
filter: {
id,
},
}, context, option2);
this.addToOperationResult(result, entity, 'update');
else if (this.store[entity]?.[id]) {
const row = this.constructRow(this.store[entity][id], context);
if (row[UpdateAtAttribute] <= d[entity][id][UpdateAtAttribute]) {
this.updateAbjointRow(entity, {
id: 'dummy',
action: 'update',
data: d[entity][id],
filter: {
id,
},
}, context, option2);
this.addToOperationResult(result, entity, 'update');
}
}
}
}

View File

@ -1904,16 +1904,19 @@ class TreeStore extends CascadeStore_1.CascadeStore {
}, context, option2);
this.addToOperationResult(result, entity, 'create');
}
else if (this.store[entity][id].$current?.[Entity_1.UpdateAtAttribute] <= d[entity][id][Entity_1.UpdateAtAttribute]) {
this.updateAbjointRow(entity, {
id: 'dummy',
action: 'update',
data: d[entity][id],
filter: {
id,
},
}, context, option2);
this.addToOperationResult(result, entity, 'update');
else if (this.store[entity]?.[id]) {
const row = this.constructRow(this.store[entity][id], context);
if (row[Entity_1.UpdateAtAttribute] <= d[entity][id][Entity_1.UpdateAtAttribute]) {
this.updateAbjointRow(entity, {
id: 'dummy',
action: 'update',
data: d[entity][id],
filter: {
id,
},
}, context, option2);
this.addToOperationResult(result, entity, 'update');
}
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "oak-memory-tree-store",
"version": "3.3.11",
"version": "3.3.12",
"description": "oak框架中内存级store的实现",
"author": {
"name": "XuChang"
@ -10,7 +10,7 @@
"es/**/*"
],
"dependencies": {
"oak-domain": "^5.1.21",
"oak-domain": "^5.1.24",
"uuid": "^8.3.2"
},
"scripts": {

View File

@ -2279,16 +2279,19 @@ export default class TreeStore<ED extends EntityDict & BaseEntityDict> extends C
} as ED[keyof ED]['CreateSingle'], context, option2);
this.addToOperationResult(result, entity, 'create');
}
else if (this.store[entity]![id].$current?.[UpdateAtAttribute]! <= d[entity]![id]![UpdateAtAttribute]!) {
this.updateAbjointRow(entity, {
id: 'dummy',
action: 'update',
data: d[entity]![id] as any,
filter: {
id,
} as any,
}, context, option2);
this.addToOperationResult(result, entity, 'update');
else if (this.store[entity]?.[id]) {
const row = this.constructRow(this.store[entity]![id]!, context);
if ((row[UpdateAtAttribute] as number) <= (d[entity]![id]![UpdateAtAttribute] as number)) {
this.updateAbjointRow(entity, {
id: 'dummy',
action: 'update',
data: d[entity]![id] as any,
filter: {
id,
} as any,
}, context, option2);
this.addToOperationResult(result, entity, 'update');
}
}
}
}