|
|
|
@ -24,14 +24,16 @@ namespace :sync do
|
|
|
|
|
team_member = TeamMember.find_by_user_id(user_action.try(:user_id))
|
|
|
|
|
if team_member
|
|
|
|
|
# 即代理之前报名的
|
|
|
|
|
if team_member.created_on < ua.created_at
|
|
|
|
|
if team_member.created_at < ua.created_at
|
|
|
|
|
params = params.merge(:action_status => 1)
|
|
|
|
|
else
|
|
|
|
|
# 代理之后报名的
|
|
|
|
|
params = params.merge(:action_status => 2)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
ua.update_attributes(params)
|
|
|
|
|
if ua.action_status != 2 # 代理成功报名的成绩不受影响
|
|
|
|
|
ua.update_attributes(params)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|