changed datasource in salesperson service

This commit is contained in:
Daniel Herrero 2017-11-22 13:19:51 +01:00
parent bd5e2a5d91
commit 3bd913cbd9
1 changed files with 4 additions and 4 deletions

View File

@ -26,10 +26,10 @@ module.exports = Client => {
let where = getCondition(filter.where, limit, skip);
let query = `SELECT em.id, em.name, em.surname
FROM Employee em
JOIN Account ac ON em.userFk = ac.id
JOIN Role ON Role.id = ac.roleFK
WHERE ac.active AND Role.\`name\`='salesPerson' ${where.sql}
FROM salix.Employee em
JOIN salix.Account ac ON em.userFk = ac.id
JOIN salix.Role r ON r.id = ac.roleFK
WHERE ac.active AND r.\`name\`='salesPerson' ${where.sql}
ORDER BY em.name ASC
LIMIT ? OFFSET ?`;