企业信息补全接口联调

This commit is contained in:
冯辉
2025-10-22 13:15:10 +08:00
parent 8bb3c424e2
commit 4f94090b42
10 changed files with 331 additions and 32 deletions

View File

@@ -111,6 +111,23 @@ class UniStorageHelper {
return storeData.filter(item => item[fieldName] === value);
}
async getRecordCount(storeName) {
const storeData = this._storageGet(this._getStoreKey(storeName)) || [];
return storeData.length;
}
async deleteOldestRecord(storeName) {
const storeKey = this._getStoreKey(storeName);
const storeData = this._storageGet(storeKey) || [];
if (storeData.length > 0) {
// 删除第一条记录(最早的记录)
const newData = storeData.slice(1);
this._storageSet(storeKey, newData);
this._log(`删除最早的记录,剩余${newData.length}条记录`);
}
return Promise.resolve();
}
/*==================
更新/删除方法
==================*/