1.优化人才库转人才推荐

This commit is contained in:
李伟 2022-11-03 16:37:25 +08:00
parent 728fad2cc7
commit 2cc7575ad4

View File

@ -3212,7 +3212,7 @@ async def option_data(
return schemas.Msg(code=200, msg='ok', data=data) return schemas.Msg(code=200, msg='ok', data=data)
@router.get("/send_talent_pool") @router.post("/send_talent_pool")
async def send_talent_pool( async def send_talent_pool(
request: Request, request: Request,
data_in: schemas.send_list, data_in: schemas.send_list,
@ -3221,12 +3221,11 @@ async def send_talent_pool(
current_user: schemas.UserDB = Depends(deps.get_current_user) current_user: schemas.UserDB = Depends(deps.get_current_user)
) -> schemas.Msg: ) -> schemas.Msg:
"""把人才库的人推到人才推荐中,并给每个人发送邮件""" """把人才库的人推到人才推荐中,并给每个人发送邮件"""
email = [i['mail'] for i in data_in.send] for i in data_in.send:
str_msg = f"""亲爱的{1}\n最近工作还顺利吗好久不见我是武汉乐谷在线科技有限公司的HR最近我们正在招聘以下职位与您匹配值非常高。\n
我们期待您的投递祝您生活愉快"""
for i in email:
if i != '': if i != '':
send_affix_mail(str_msg, i) str_msg = f"""亲爱的{i['name']}\n最近工作还顺利吗好久不见我是武汉乐谷在线科技有限公司的HR最近我们正在招聘以下职位与您匹配值非常高。\n
我们期待您的投递祝您生活愉快"""
send_affix_mail(str_msg, i['mail'])
uid = [i['uid'] for i in data_in.send] uid = [i['uid'] for i in data_in.send]
for i in uid: for i in uid:
up_sql = f"""ALTER TABLE HR.resumes update interview_stage = 0 WHERE uid = '{i}'""" up_sql = f"""ALTER TABLE HR.resumes update interview_stage = 0 WHERE uid = '{i}'"""