Browse Source

1 0 true false sql查询

master
巴林闲侠 2 years ago
parent
commit
81469dc540
  1. 2
      api/app/lib/controllers/member/index.js
  2. 2
      api/app/lib/utils/member.js

2
api/app/lib/controllers/member/index.js

@ -120,7 +120,7 @@ async function searchPepMember (ctx) {
LEFT JOIN department
ON department.id = department_user.department
WHERE
user.delete = 0
user.delete = false
${whereOption.length ? `AND ${whereOption.join(' OR ')}` : ''}
`).toPromise()

2
api/app/lib/utils/member.js

@ -199,7 +199,7 @@ module.exports = function (app, opts) {
ON vacateCountStatistic.pepUserId = member.pep_user_id
`: ''}
WHERE
member.del = 0
member.del = false
${keywordTarget == 'role' && keyword ? `
AND user.id IN (
SELECT user_role.user

Loading…
Cancel
Save