fix: #6557 replace procedure
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
d305de2438
commit
ed77347fe1
|
@ -30,13 +30,12 @@ module.exports = Self => {
|
||||||
if (typeof options == 'object')
|
if (typeof options == 'object')
|
||||||
Object.assign(myOptions, options);
|
Object.assign(myOptions, options);
|
||||||
|
|
||||||
stmts.push(new ParameterizedSQL('CALL vn.subordinateGetList(?)', [userId]));
|
stmts.push(new ParameterizedSQL('CALL vn.worker_getHierarchy(?)', [userId]));
|
||||||
const queryIndex = stmts.push('SELECT * FROM tmp.subordinate') - 1;
|
const queryIndex = stmts.push('SELECT * FROM tmp.workerHierarchyList') - 1;
|
||||||
stmts.push('DROP TEMPORARY TABLE tmp.subordinate');
|
stmts.push('DROP TEMPORARY TABLE tmp.workerHierarchyList');
|
||||||
|
|
||||||
const sql = ParameterizedSQL.join(stmts, ';');
|
const sql = ParameterizedSQL.join(stmts, ';');
|
||||||
const result = await conn.executeStmt(sql, myOptions);
|
const result = await conn.executeStmt(sql, myOptions);
|
||||||
|
|
||||||
return result[queryIndex];
|
return result[queryIndex];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue