This commit is contained in:
parent
d47429b4a7
commit
d1a3c67d2e
|
@ -42,14 +42,15 @@ module.exports = Self => {
|
||||||
|
|
||||||
const stmt = new ParameterizedSQL(`
|
const stmt = new ParameterizedSQL(`
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM(
|
FROM(
|
||||||
SELECT w.id, w.code, u.name, u.nickname, u.active, b.departmentFk
|
SELECT w.id, w.code, u.name, u.nickname, u.active, b.departmentFk
|
||||||
FROM worker w
|
FROM worker w
|
||||||
JOIN account.user u ON u.id = w.id
|
JOIN account.user u ON u.id = w.id
|
||||||
LEFT JOIN business b ON b.workerFk = w.id
|
LEFT JOIN business b ON b.workerFk = w.id
|
||||||
ORDER BY b.id DESC
|
ORDER BY b.id DESC
|
||||||
) w
|
LIMIT 10000000000000000000
|
||||||
GROUP BY w.id`);
|
) w
|
||||||
|
GROUP BY w.id`);
|
||||||
|
|
||||||
stmt.merge(conn.makeSuffix(filter));
|
stmt.merge(conn.makeSuffix(filter));
|
||||||
return conn.executeStmt(stmt);
|
return conn.executeStmt(stmt);
|
||||||
|
|
Loading…
Reference in New Issue