Browse Source

API_HR_URL 参数

master
巴林闲侠 2 years ago
parent
commit
ace284e8d7
  1. 4
      api/app/lib/controllers/member/index.js
  2. 11
      api/app/lib/utils/member.js
  3. 1
      web/config.js

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

@ -246,7 +246,7 @@ async function list (ctx) {
const { judgeHoliday, memberList } = ctx.app.fs.utils const { judgeHoliday, memberList } = ctx.app.fs.utils
const { const {
keywordTarget, keyword, limit, page, state, keywordTarget, keyword, limit, page, state,
hiredateStart, hiredateEnd hiredateStart, hiredateEnd, marital, native, workPlace
} = ctx.query } = ctx.query
const curDay = moment().format('YYYY-MM-DD') const curDay = moment().format('YYYY-MM-DD')
@ -267,7 +267,7 @@ async function list (ctx) {
} }
const userRes = await memberList({ const userRes = await memberList({
keywordTarget, keyword, limit, page, state, keywordTarget, keyword, limit, page, state,
hiredateStart, hiredateEnd hiredateStart, hiredateEnd, marital, native, workPlace
}) })
let returnD = [] let returnD = []

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

@ -6,7 +6,7 @@ module.exports = function (app, opts) {
async function memberList ({ async function memberList ({
keywordTarget, keyword, limit, page, state, keywordTarget, keyword, limit, page, state,
hiredateStart, hiredateEnd hiredateStart, hiredateEnd, marital, native, workPlace
}) { }) {
const { judgeHoliday } = app.fs.utils const { judgeHoliday } = app.fs.utils
const { clickHouse } = app.fs const { clickHouse } = app.fs
@ -123,6 +123,15 @@ module.exports = function (app, opts) {
${hiredateEnd ? ` ${hiredateEnd ? `
AND member.hiredate <= '${moment(hiredateEnd).format('YYYY-MM-DD')}' 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(` const userRes = await clickHouse.hr.query(`

1
web/config.js

@ -34,6 +34,7 @@ const ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMA
if ( if (
!API_URL !API_URL
|| !API_HR_URL
|| !ANXINCLOUD_QINIU_AK || !ANXINCLOUD_QINIU_SK || !ANXINCLOUD_QINIU_BUCKET_RESOURCE || !ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE || !ANXINCLOUD_QINIU_AK || !ANXINCLOUD_QINIU_SK || !ANXINCLOUD_QINIU_BUCKET_RESOURCE || !ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE
) { ) {
console.log('缺少启动参数,异常退出'); console.log('缺少启动参数,异常退出');

Loading…
Cancel
Save