订单入职过保逻辑

一.增加业务逻辑

订单入职/过保时的操作(update_order_status)
  1. 将该简历的其他推荐记录删除
  2. 将简历的状态 改为 不考虑机会 - (忠池提供function)
  3. 将简历的推荐记录全部设为无效

二.刷过往数据脚本

一.刷过往数据
  1. 获取昨天设置过为入职/过保的所有订单号(去重)

    1
    select distinct order_id from hunter_order_progress where progress in (23,24);
  2. 循环根据订单号获取tob账号topid,toh账号id,职位id,简历id,order_id

    1
    select tob_account_top_id,toh_account_id,tob_position_id,toh_resume_id,order_id from hunter_order where order_id=当前order_id;
  3. 从推荐库中根据tob账号topid,简历id获取所有推荐记录,删除(order_id不等于订单信息中的)所有未邀约的推荐记录.

    1
    2
    3
    4
    select prefix from table_alloter where uid=tob_account_top_id;
    select order_id,process_status from prefix_recommend_toh_resume where resume_id=toh_resume_id;

    foreach($ret as $order){ if order_id != 当前order_id}{process_status = 99};
二.刷过往订单数据
  1. 获取所有设置过为入职/过保的所有订单号(去重)

    1
    select distinct order_id from hunter_order where progress in (23,24);
  2. 循环根据订单号获取tob账号id,toh账号id,职位id,简历id,order_id

    1
    select tob_account_top_id,toh_account_id,tob_posiition_id,toh_resume_id,order_id from hunter_order where order_id=当前order_id;
  3. 从订单库中根据tob账号topid,简历id获取所有订单,将(order_id不等于订单信息中的)所有订单改成无效推荐.

    1
    2
    3
    select order_id from hunter_order where tob_account_top_id = tob_account_top_id and toh_resume_id=toh_resume_id;

    foreach($ret as $order){ if order_id != 当前order_id}{ 调用update_order_status,传参progress=58,order_id,remark };