From 1fcdd18c62bd3aedf57d6f01483a42afcb8ed3b8 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Wed, 14 Sep 2022 17:24:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=A7=93=E5=90=8D=E3=80=81?= =?UTF-8?q?=E9=83=A8=E9=97=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/organization/index.js | 2 +- api/app/lib/service/clickHouseClient.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/app/lib/controllers/organization/index.js b/api/app/lib/controllers/organization/index.js index 28c7d3a..c525290 100644 --- a/api/app/lib/controllers/organization/index.js +++ b/api/app/lib/controllers/organization/index.js @@ -193,7 +193,7 @@ async function user (ctx) { for (let u of userRes.rows.concat(adminRes)) { userIds.add(u.pepUserId) } - let userPepRes = await clickHouse.pepEmis.query(`SELECT user.id AS id, "user"."name" AS name, department.name AS depName, department.id AS depId FROM department_user LEFT JOIN user ON department_user.user=user.id LEFT JOIN department ON department.id=department_user.department WHERE user.id IN (${[...userIds].join(',')})`).toPromise() + let userPepRes = await clickHouse.pepEmis.query(`SELECT user.id AS id, "user"."name" AS name, department.name AS depName, department.id AS depId FROM department_user LEFT JOIN user ON department_user.user=user.id LEFT JOIN department ON department.id=department_user.department WHERE user.id IN (${[...userIds].join(',')}) AND department.delete=false`).toPromise() for (let u of userRes.rows.concat(adminRes)) { const corUsers = userPepRes.filter(up => up.id == u.pepUserId) diff --git a/api/app/lib/service/clickHouseClient.js b/api/app/lib/service/clickHouseClient.js index e23d894..7534465 100644 --- a/api/app/lib/service/clickHouseClient.js +++ b/api/app/lib/service/clickHouseClient.js @@ -11,7 +11,7 @@ function factory (app, opts) { app.fs.clickHouse[d.name] = new ClickHouse({ url: url, port: port, - debug: true, + debug: opts.dev, format: "json", config: { database: d.db,