api的修改
This commit is contained in:
parent
e46c963931
commit
8f7c6f49b7
|
@ -412,7 +412,7 @@ module ApiHelper
|
|||
|
||||
#课程动态的更新
|
||||
def update_course_activity_api type, id
|
||||
course_activity = CourseActivity.where("course_act_type=? and course_act_id =?", type.to_s, id).first
|
||||
course_activity = CourseActivity.where("course_act_type=? and course_act_id =?", type.to_s, id.to_i).first
|
||||
if course_activity
|
||||
course_activity.updated_at = Time.now
|
||||
course_activity.save
|
||||
|
@ -420,7 +420,7 @@ module ApiHelper
|
|||
end
|
||||
#首页动态更新
|
||||
def update_user_activity_api type, id
|
||||
user_activity = UserActivity.where("act_type=? and act_id =?", type.to_s, id).first
|
||||
user_activity = UserActivity.where("act_type=? and act_id =?", type.to_s, id.to_i).first
|
||||
if user_activity
|
||||
user_activity.updated_at = Time.now
|
||||
user_activity.save
|
||||
|
@ -428,7 +428,7 @@ module ApiHelper
|
|||
end
|
||||
#项目动态更新
|
||||
def update_forge_activity_api type, id
|
||||
forge_activity = ForgeActivity.where("forge_act_type=? and forge_act_id=?", type.to_s, id).first
|
||||
forge_activity = ForgeActivity.where("forge_act_type=? and forge_act_id=?", type.to_s, id.to_i).first
|
||||
if forge_activity
|
||||
forge_activity.updated_at = Time.now
|
||||
forge_activity.save
|
||||
|
@ -436,7 +436,7 @@ module ApiHelper
|
|||
end
|
||||
#组织动态更新
|
||||
def update_org_activity_api type , id
|
||||
org_activity = OrgActivity.where("org_act_type=? and org_act_id =?", type.to_s, id).first
|
||||
org_activity = OrgActivity.where("org_act_type=? and org_act_id =?", type.to_s, id.to_i).first
|
||||
if org_activity
|
||||
org_activity.updated_at = Time.now
|
||||
org_activity.save
|
||||
|
@ -444,7 +444,7 @@ module ApiHelper
|
|||
end
|
||||
#个人动态更新
|
||||
def update_principal_activity_api type, id
|
||||
principal_activity = PrincipalActivity.where("principal_act_type=? and principal_act_id =?", type.to_s, id).first
|
||||
principal_activity = PrincipalActivity.where("principal_act_type=? and principal_act_id =?", type.to_s, id.to_i).first
|
||||
if principal_activity
|
||||
principal_activity.updated_at = Time.now
|
||||
principal_activity.save
|
||||
|
|
Loading…
Reference in New Issue