Esempio n. 1
0
 def save_feed_result(self, feed, resume):
     feed_result = FeedUtils.add_feed_result(
         feed.feed_obj_id,
         resume.resume_id,
         source='talent_partner',
     )
     return feed_result
Esempio n. 2
0
 def save_feed_result(self, feed, resume):
     feed_result = FeedUtils.add_feed_result(
         feed.feed_obj_id,
         resume.resume_id,
         source='talent_partner',
     )
     return feed_result
Esempio n. 3
0
    def post(self, request):
        resume_id = request.POST.get('resume_id', '')
        feed_id = request.POST.get('feed_id', '')
        username = request.user.username

        feed_result = FeedUtils.add_feed_result(
            feed_id,
            resume_id,
            admin=username,
        )

        if not feed_result:
            result = {
                'status': 'data_error',
                'msg': '数据有误',
            }
        else:
            candidate = self.get_candidate_by_resume_id(resume_id)
            candidate.has_contact = True
            candidate.save()

            result = {
                'status': 'ok',
                'msg': '加入成功',
            }
        return JsonResponse(result)
Esempio n. 4
0
def main():
    reco_task_query = RecoResumeTask.objects.select_related(
        'feed',
        'resume',
    ).filter(
        action=1,
    )

    for rt in reco_task_query:
        feed_obj_id = rt.feed.feed_obj_id
        resume_id = rt.upload_resume.resume_id

        FeedUtils.add_feed_result(
            feed_obj_id,
            resume_id,
            source='talent_partner',
        )
        print feed_obj_id, 'success'