平台管理员的首页报500
This commit is contained in:
parent
cb5548c853
commit
2c42a51195
|
@ -783,8 +783,8 @@ class AdminController < ApplicationController
|
||||||
begin
|
begin
|
||||||
#更新消息表的status
|
#更新消息表的status
|
||||||
applied_message_id = aas.school_id
|
applied_message_id = aas.school_id
|
||||||
applied_message = AppliedMessage.where(:applied_id => applied_message_id, :applied_type => "ApplyAddSchools")
|
#applied_message = AppliedMessage.where(:applied_id => applied_message_id, :applied_type => "ApplyAddSchools")
|
||||||
applied_message.update_all(:status => 2)
|
#applied_message.update_all(:status => 2)
|
||||||
aas.update_attribute(:status, 2)
|
aas.update_attribute(:status, 2)
|
||||||
AppliedMessage.create(:user_id => aas.user_id, :status => 2, :viewed => 0, :applied_id => aas.id, :applied_type => "ApplyAddSchools", :name => school[0].name )
|
AppliedMessage.create(:user_id => aas.user_id, :status => 2, :viewed => 0, :applied_id => aas.id, :applied_type => "ApplyAddSchools", :name => school[0].name )
|
||||||
users = UserExtensions.where("school_id = #{aas.school_id}")
|
users = UserExtensions.where("school_id = #{aas.school_id}")
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
class UpdateAppliedMessagesStatus < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
sql = "update applied_messages set status = 1 where applied_id in(2495, 2496, 2497)"
|
||||||
|
execute(sql)
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
end
|
||||||
|
end
|
52
db/schema.rb
52
db/schema.rb
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20170209020934) do
|
ActiveRecord::Schema.define(:version => 20170217004513) do
|
||||||
|
|
||||||
create_table "activities", :force => true do |t|
|
create_table "activities", :force => true do |t|
|
||||||
t.integer "act_id", :null => false
|
t.integer "act_id", :null => false
|
||||||
|
@ -358,6 +358,8 @@ ActiveRecord::Schema.define(:version => 20170209020934) do
|
||||||
t.date "commit_date"
|
t.date "commit_date"
|
||||||
t.string "scmid"
|
t.string "scmid"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
t.integer "project_id"
|
||||||
|
t.integer "type", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on"
|
add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on"
|
||||||
|
@ -628,20 +630,6 @@ ActiveRecord::Schema.define(:version => 20170209020934) do
|
||||||
t.integer "container_id", :default => 0
|
t.integer "container_id", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "course_class_post", :id => false, :force => true do |t|
|
|
||||||
t.integer "班级id", :default => 0, :null => false
|
|
||||||
t.string "班级名"
|
|
||||||
t.integer "帖子id", :default => 0, :null => false
|
|
||||||
t.integer "主贴id"
|
|
||||||
t.string "帖子标题", :default => "", :null => false
|
|
||||||
t.text "帖子内容"
|
|
||||||
t.integer "帖子用户id"
|
|
||||||
t.integer "帖子回复数", :default => 0, :null => false
|
|
||||||
t.integer "最后回帖id"
|
|
||||||
t.datetime "发帖时间", :null => false
|
|
||||||
t.datetime "帖子更新时间", :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "course_contributor_scores", :force => true do |t|
|
create_table "course_contributor_scores", :force => true do |t|
|
||||||
t.integer "course_id"
|
t.integer "course_id"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
@ -832,6 +820,21 @@ ActiveRecord::Schema.define(:version => 20170209020934) do
|
||||||
|
|
||||||
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
||||||
|
|
||||||
|
create_table "delayed_jobs_20161218", :id => false, :force => true do |t|
|
||||||
|
t.integer "id", :default => 0, :null => false
|
||||||
|
t.integer "priority", :default => 0, :null => false
|
||||||
|
t.integer "attempts", :default => 0, :null => false
|
||||||
|
t.text "handler", :null => false
|
||||||
|
t.text "last_error"
|
||||||
|
t.datetime "run_at"
|
||||||
|
t.datetime "locked_at"
|
||||||
|
t.datetime "failed_at"
|
||||||
|
t.string "locked_by"
|
||||||
|
t.string "queue"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "discuss_demos", :force => true do |t|
|
create_table "discuss_demos", :force => true do |t|
|
||||||
t.string "title"
|
t.string "title"
|
||||||
t.text "body"
|
t.text "body"
|
||||||
|
@ -962,8 +965,6 @@ ActiveRecord::Schema.define(:version => 20170209020934) do
|
||||||
t.datetime "publish_time"
|
t.datetime "publish_time"
|
||||||
t.datetime "end_time"
|
t.datetime "end_time"
|
||||||
t.integer "show_result"
|
t.integer "show_result"
|
||||||
t.integer "question_random", :default => 0
|
|
||||||
t.integer "choice_random", :default => 0
|
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "first_pages", :force => true do |t|
|
create_table "first_pages", :force => true do |t|
|
||||||
|
@ -1153,6 +1154,23 @@ ActiveRecord::Schema.define(:version => 20170209020934) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "ii", :force => true do |t|
|
||||||
|
t.integer "project_id"
|
||||||
|
t.string "author_login"
|
||||||
|
t.string "rep_identifier"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
t.integer "sonar_version", :default => 0
|
||||||
|
t.string "path"
|
||||||
|
t.string "branch"
|
||||||
|
t.string "language"
|
||||||
|
t.string "sonar_name"
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "innodb_monitor", :id => false, :force => true do |t|
|
||||||
|
t.integer "a"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "invite_lists", :force => true do |t|
|
create_table "invite_lists", :force => true do |t|
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
|
Loading…
Reference in New Issue