sync的时候有个边界没判断对
This commit is contained in:
parent
3b6ddbe317
commit
17380fa8f9
23
es/store.js
23
es/store.js
|
|
@ -1902,16 +1902,19 @@ export default class TreeStore extends CascadeStore {
|
||||||
}, context, option2);
|
}, context, option2);
|
||||||
this.addToOperationResult(result, entity, 'create');
|
this.addToOperationResult(result, entity, 'create');
|
||||||
}
|
}
|
||||||
else if (this.store[entity][id].$current?.[UpdateAtAttribute] <= d[entity][id][UpdateAtAttribute]) {
|
else if (this.store[entity]?.[id]) {
|
||||||
this.updateAbjointRow(entity, {
|
const row = this.constructRow(this.store[entity][id], context);
|
||||||
id: 'dummy',
|
if (row[UpdateAtAttribute] < d[entity][id][UpdateAtAttribute]) {
|
||||||
action: 'update',
|
this.updateAbjointRow(entity, {
|
||||||
data: d[entity][id],
|
id: 'dummy',
|
||||||
filter: {
|
action: 'update',
|
||||||
id,
|
data: d[entity][id],
|
||||||
},
|
filter: {
|
||||||
}, context, option2);
|
id,
|
||||||
this.addToOperationResult(result, entity, 'update');
|
},
|
||||||
|
}, context, option2);
|
||||||
|
this.addToOperationResult(result, entity, 'update');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
23
lib/store.js
23
lib/store.js
|
|
@ -1904,16 +1904,19 @@ class TreeStore extends CascadeStore_1.CascadeStore {
|
||||||
}, context, option2);
|
}, context, option2);
|
||||||
this.addToOperationResult(result, entity, 'create');
|
this.addToOperationResult(result, entity, 'create');
|
||||||
}
|
}
|
||||||
else if (this.store[entity][id].$current?.[Entity_1.UpdateAtAttribute] <= d[entity][id][Entity_1.UpdateAtAttribute]) {
|
else if (this.store[entity]?.[id]) {
|
||||||
this.updateAbjointRow(entity, {
|
const row = this.constructRow(this.store[entity][id], context);
|
||||||
id: 'dummy',
|
if (row[Entity_1.UpdateAtAttribute] < d[entity][id][Entity_1.UpdateAtAttribute]) {
|
||||||
action: 'update',
|
this.updateAbjointRow(entity, {
|
||||||
data: d[entity][id],
|
id: 'dummy',
|
||||||
filter: {
|
action: 'update',
|
||||||
id,
|
data: d[entity][id],
|
||||||
},
|
filter: {
|
||||||
}, context, option2);
|
id,
|
||||||
this.addToOperationResult(result, entity, 'update');
|
},
|
||||||
|
}, context, option2);
|
||||||
|
this.addToOperationResult(result, entity, 'update');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
23
src/store.ts
23
src/store.ts
|
|
@ -2279,16 +2279,19 @@ export default class TreeStore<ED extends EntityDict & BaseEntityDict> extends C
|
||||||
} as ED[keyof ED]['CreateSingle'], context, option2);
|
} as ED[keyof ED]['CreateSingle'], context, option2);
|
||||||
this.addToOperationResult(result, entity, 'create');
|
this.addToOperationResult(result, entity, 'create');
|
||||||
}
|
}
|
||||||
else if (this.store[entity]![id].$current?.[UpdateAtAttribute]! <= d[entity]![id]![UpdateAtAttribute]!) {
|
else if (this.store[entity]?.[id]) {
|
||||||
this.updateAbjointRow(entity, {
|
const row = this.constructRow(this.store[entity]![id]!, context);
|
||||||
id: 'dummy',
|
if ((row[UpdateAtAttribute] as number) < (d[entity]![id]![UpdateAtAttribute] as number)) {
|
||||||
action: 'update',
|
this.updateAbjointRow(entity, {
|
||||||
data: d[entity]![id] as any,
|
id: 'dummy',
|
||||||
filter: {
|
action: 'update',
|
||||||
id,
|
data: d[entity]![id] as any,
|
||||||
} as any,
|
filter: {
|
||||||
}, context, option2);
|
id,
|
||||||
this.addToOperationResult(result, entity, 'update');
|
} as any,
|
||||||
|
}, context, option2);
|
||||||
|
this.addToOperationResult(result, entity, 'update');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue