Merge branch 'rep_quality' into develop

This commit is contained in:
huang 2016-07-08 19:47:50 +08:00
commit 8365042399
1 changed files with 4 additions and 4 deletions

View File

@ -39,23 +39,23 @@ namespace :update_homework do
end
end
s_time = time
logger.info("latest time is =========================> #{time}")
puts "latest time is =========================> #{time}"
if time.strftime('%Y-%m-%d %H:%M:%S') > h.updated_at.strftime('%Y-%m-%d %H:%M:%S')
h.update_column('updated_at', s_time)
course_activity = CourseActivity.where("course_act_type=? and course_act_id =?", 'HomeworkCommon', h.id).first
if course_activity && (time.strftime('%Y-%m-%d %H:%M:%S') > course_activity.updated_at.strftime('%Y-%m-%d %H:%M:%S'))
course_activity.update_column('updated_at', s_time)
logger.info("course_activity time is =========================> #{course_activity}")
puts "user_activity time is =========================> #{course_activity}"
end
user_activity = UserActivity.where("act_type=? and act_id =?", 'HomeworkCommon', h.id).first
if user_activity && (time.strftime('%Y-%m-%d %H:%M:%S') > user_activity.updated_at.strftime('%Y-%m-%d %H:%M:%S'))
user_activity.update_column('updated_at', s_time)
logger.info("user_activity time is =========================> #{user_activity}")
puts "user_activity time is =========================> #{user_activity}"
end
org_activity = OrgActivity.where("org_act_type=? and org_act_id =?", 'HomeworkCommon', h.id).first
if org_activity && (time.strftime('%Y-%m-%d %H:%M:%S') > org_activity.updated_at.strftime('%Y-%m-%d %H:%M:%S'))
org_activity.update_column('updated_at', s_time)
logger.info("org_activity time is =========================> #{s_time}")
puts "org_activity time is =========================> #{org_activity}"
end
end
end