瀏覽代碼

问题项目,导入Excel后,新增节点树结构错误

maixinrong 5 年之前
父節點
當前提交
dc9b1e15c5
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/service/ledger.js

+ 1 - 1
app/service/ledger.js

@@ -739,7 +739,7 @@ module.exports = app => {
                     await transaction.insert(this.ctx.service.pos.tableName, cacheTree.pos);
                 }
                 await transaction.commit();
-                this.cache.set(cacheKey, cacheTree.items.length + 1, 'EX', this.ctx.app.config.cacheTime);
+                this.cache.set(cacheKey, cacheTree.keyNodeId, 'EX', this.ctx.app.config.cacheTime);
                 return {bills: datas, pos: cacheTree.pos}
             } catch (err) {
                 await transaction.rollback();