From b9d0d1620c9245f7a309989de0f779679fbc74b4 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Thu, 15 Sep 2022 19:20:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E5=88=A4?= =?UTF-8?q?=E9=87=8D?= 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/controllers/project/index.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 fbda0d1..c06b9e2 100644 --- a/api/app/lib/controllers/organization/index.js +++ b/api/app/lib/controllers/organization/index.js @@ -80,7 +80,7 @@ async function editUser (ctx) { ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.status = 400; ctx.body = { - + message: typeof error == 'string' ? error : undefined } } } diff --git a/api/app/lib/controllers/project/index.js b/api/app/lib/controllers/project/index.js index 88f62b0..85062af 100644 --- a/api/app/lib/controllers/project/index.js +++ b/api/app/lib/controllers/project/index.js @@ -43,7 +43,7 @@ async function projectPManage (ctx) { const models = ctx.fs.dc.models; const { clickHouse } = ctx.app.fs - const projectRes = await clickHouse.projectManage.query(`SELECT * FROM t_project WHERE project_state = 4 ORDER BY id DESC`).toPromise() + const projectRes = await clickHouse.projectManage.query(`SELECT id, project_name FROM t_pim_project WHERE isdelete=0 ORDER BY id DESC`).toPromise() ctx.status = 200; ctx.body = projectRes From fd708308a6a1ec97929ea7a20da2a97775e4c753 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Thu, 15 Sep 2022 19:24:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=AE=A1=E7=90=86&=E6=88=90=E5=91=98?= =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/organization/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app/lib/controllers/organization/index.js b/api/app/lib/controllers/organization/index.js index c06b9e2..e832813 100644 --- a/api/app/lib/controllers/organization/index.js +++ b/api/app/lib/controllers/organization/index.js @@ -96,7 +96,7 @@ async function putUser (ctx) { } }) - if (existUserRes && existUserRes.role.includes('admin') && !disabled) { + if (existUserRes && existUserRes.role.includes('admin') && disabled == false) { throw '成员不能既是管理员又是普通成员' }