Pārlūkot izejas kodu

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

maixinrong 5 gadi atpakaļ
vecāks
revīzija
dc9b1e15c5
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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.insert(this.ctx.service.pos.tableName, cacheTree.pos);
                 }
                 }
                 await transaction.commit();
                 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}
                 return {bills: datas, pos: cacheTree.pos}
             } catch (err) {
             } catch (err) {
                 await transaction.rollback();
                 await transaction.rollback();