From ace284e8d79b918f19bf3c8374734cb95a497ed8 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Tue, 18 Oct 2022 15:15:59 +0800 Subject: [PATCH] =?UTF-8?q?=20API=5FHR=5FURL=20=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/member/index.js | 4 ++-- api/app/lib/utils/member.js | 11 ++++++++++- web/config.js | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/api/app/lib/controllers/member/index.js b/api/app/lib/controllers/member/index.js index 9e654a5..62a7da4 100644 --- a/api/app/lib/controllers/member/index.js +++ b/api/app/lib/controllers/member/index.js @@ -246,7 +246,7 @@ async function list (ctx) { const { judgeHoliday, memberList } = ctx.app.fs.utils const { keywordTarget, keyword, limit, page, state, - hiredateStart, hiredateEnd + hiredateStart, hiredateEnd, marital, native, workPlace } = ctx.query const curDay = moment().format('YYYY-MM-DD') @@ -267,7 +267,7 @@ async function list (ctx) { } const userRes = await memberList({ keywordTarget, keyword, limit, page, state, - hiredateStart, hiredateEnd + hiredateStart, hiredateEnd, marital, native, workPlace }) let returnD = [] diff --git a/api/app/lib/utils/member.js b/api/app/lib/utils/member.js index 2629e8b..589494b 100644 --- a/api/app/lib/utils/member.js +++ b/api/app/lib/utils/member.js @@ -6,7 +6,7 @@ module.exports = function (app, opts) { async function memberList ({ keywordTarget, keyword, limit, page, state, - hiredateStart, hiredateEnd + hiredateStart, hiredateEnd, marital, native, workPlace }) { const { judgeHoliday } = app.fs.utils const { clickHouse } = app.fs @@ -123,6 +123,15 @@ module.exports = function (app, opts) { ${hiredateEnd ? ` AND member.hiredate <= '${moment(hiredateEnd).format('YYYY-MM-DD')}' ` : ''} + ${marital ? ` + AND member.marital = '${marital}' + `: ''} + ${native ? ` + AND member.native_place = '${native}' + `: ''} + ${native ? ` + AND member.work_place = '${workPlace}' + `: ''} ` const userRes = await clickHouse.hr.query(` diff --git a/web/config.js b/web/config.js index bdb1a46..03989d4 100644 --- a/web/config.js +++ b/web/config.js @@ -34,6 +34,7 @@ const ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMA if ( !API_URL + || !API_HR_URL || !ANXINCLOUD_QINIU_AK || !ANXINCLOUD_QINIU_SK || !ANXINCLOUD_QINIU_BUCKET_RESOURCE || !ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE ) { console.log('缺少启动参数,异常退出');