|
@@ -834,7 +834,7 @@ module.exports = app => {
|
|
|
try {
|
|
|
const sData = await this.transaction.update(this.tableName, { id: selectData.id, order: selectData.order - 1 });
|
|
|
const pData = await this.transaction.update(this.tableName, { id: preData.id, order: preData.order + 1 });
|
|
|
- this.transaction.commit();
|
|
|
+ await this.transaction.commit();
|
|
|
} catch (err) {
|
|
|
await this.transaction.rollback();
|
|
|
throw err;
|
|
@@ -868,7 +868,7 @@ module.exports = app => {
|
|
|
try {
|
|
|
const sData = await this.transaction.update(this.tableName, { id: selectData.id, order: selectData.order + 1 });
|
|
|
const pData = await this.transaction.update(this.tableName, { id: nextData.id, order: nextData.order - 1 });
|
|
|
- this.transaction.commit();
|
|
|
+ await this.transaction.commit();
|
|
|
} catch (err) {
|
|
|
await this.transaction.rollback();
|
|
|
throw err;
|
|
@@ -993,13 +993,13 @@ module.exports = app => {
|
|
|
try {
|
|
|
// 选中节点--父节点 选中节点为firstChild时,修改is_leaf
|
|
|
if (selectData.order === 1) {
|
|
|
- this.transaction.update(this.tableName, {
|
|
|
+ await this.transaction.update(this.tableName, {
|
|
|
id: parentData.id,
|
|
|
is_leaf: true,
|
|
|
total_price: 0
|
|
|
});
|
|
|
} else {
|
|
|
- this.transaction.update(this.tableName, {
|
|
|
+ await this.transaction.update(this.tableName, {
|
|
|
id: parentData.id,
|
|
|
total_price: await this.addUpChildren(tenderId, selectData.ledger_pid, selectData.order, '<')
|
|
|
});
|
|
@@ -1063,7 +1063,7 @@ module.exports = app => {
|
|
|
literal: 'Replace',
|
|
|
});
|
|
|
const [sql, sqlParam] = this.sqlBuilder.build(this.tableName, 'update');
|
|
|
- const data = this.transaction.query(sql, sqlParam);
|
|
|
+ const data = await this.transaction.query(sql, sqlParam);
|
|
|
|
|
|
return data;
|
|
|
}
|
|
@@ -1118,9 +1118,9 @@ module.exports = app => {
|
|
|
}
|
|
|
await this.transaction.update(this.tableName, updateData2);
|
|
|
}
|
|
|
- this.transaction.commit();
|
|
|
+ await this.transaction.commit();
|
|
|
} catch (err) {
|
|
|
- this.transaction.rollback();
|
|
|
+ await this.transaction.rollback();
|
|
|
throw err;
|
|
|
}
|
|
|
|
|
@@ -1242,9 +1242,9 @@ module.exports = app => {
|
|
|
const updateData = this._filterUpdateInvalidField(updateNode.id, data);
|
|
|
await this.transaction.update(this.tableName, updateData);
|
|
|
}
|
|
|
- this.transaction.commit();
|
|
|
+ await this.transaction.commit();
|
|
|
} catch (err) {
|
|
|
- this.transaction.rollback();
|
|
|
+ await this.transaction.rollback();
|
|
|
throw err;
|
|
|
}
|
|
|
|
|
@@ -1459,9 +1459,9 @@ module.exports = app => {
|
|
|
await this.transaction.update(this.tableName, updateData);
|
|
|
}
|
|
|
await this._increCalcParent(tenderId, updateMap);
|
|
|
- this.transaction.commit();
|
|
|
+ await this.transaction.commit();
|
|
|
} catch (err) {
|
|
|
- this.transaction.rollback();
|
|
|
+ await this.transaction.rollback();
|
|
|
throw err;
|
|
|
}
|
|
|
|