changed datasource in salesperson service
This commit is contained in:
parent
bd5e2a5d91
commit
3bd913cbd9
|
@ -26,10 +26,10 @@ module.exports = Client => {
|
||||||
let where = getCondition(filter.where, limit, skip);
|
let where = getCondition(filter.where, limit, skip);
|
||||||
|
|
||||||
let query = `SELECT em.id, em.name, em.surname
|
let query = `SELECT em.id, em.name, em.surname
|
||||||
FROM Employee em
|
FROM salix.Employee em
|
||||||
JOIN Account ac ON em.userFk = ac.id
|
JOIN salix.Account ac ON em.userFk = ac.id
|
||||||
JOIN Role ON Role.id = ac.roleFK
|
JOIN salix.Role r ON r.id = ac.roleFK
|
||||||
WHERE ac.active AND Role.\`name\`='salesPerson' ${where.sql}
|
WHERE ac.active AND r.\`name\`='salesPerson' ${where.sql}
|
||||||
ORDER BY em.name ASC
|
ORDER BY em.name ASC
|
||||||
LIMIT ? OFFSET ?`;
|
LIMIT ? OFFSET ?`;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue