From 81469dc540a0daae3a451b67c1619da0d9cd8e7c Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Thu, 3 Nov 2022 10:18:24 +0800 Subject: [PATCH] =?UTF-8?q?1=200=20true=20false=20=20sql=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/member/index.js | 2 +- api/app/lib/utils/member.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/app/lib/controllers/member/index.js b/api/app/lib/controllers/member/index.js index fc6a824..5598c61 100644 --- a/api/app/lib/controllers/member/index.js +++ b/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() diff --git a/api/app/lib/utils/member.js b/api/app/lib/utils/member.js index cb727e2..936f790 100644 --- a/api/app/lib/utils/member.js +++ b/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