diff --git a/app/controllers/discusses_controller.rb b/app/controllers/discusses_controller.rb index bcbba1a3a..3b1dff96b 100644 --- a/app/controllers/discusses_controller.rb +++ b/app/controllers/discusses_controller.rb @@ -11,9 +11,9 @@ class DiscussesController < ApplicationController # 总数,分页使用 if @manger - @disscuss_count = Discuss.where(:dis_id => @container.id, :dis_type => @container.class.to_s, :root_id => nil).count disscusses = Discuss.where(:dis_id => @container.id, :dis_type => @container.class.to_s, :root_id => nil) + @disscuss_count = disscusses.count @discusses = disscusses.joins("left join games on discusses.challenge_id = games.challenge_id and discusses.user_id = games.user_id") .select("discusses.*, games.identifier").includes(:user, :praise_treads).limit(LIMIT).offset(offset) else diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 055c656eb..fcdd81953 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -26,7 +26,7 @@ class GamesController < ApplicationController game_count = Game.where(myshixun_id: @game.myshixun_id).count discusses = @shixun.discusses - discusses = discusses.where('hidden = false OR user_id = :user_id', user_id: current_user.id) unless current_user.admin? + discusses = discusses.where('hidden = false OR user_id = :user_id', user_id: current_user.id) unless current_user.admin_or_business? discusses_count = discusses.count @user = @game.owner diff --git a/lib/tasks/statistic_subject_info.rake b/lib/tasks/statistic_subject_info.rake index 0385e3b5a..68d75293d 100644 --- a/lib/tasks/statistic_subject_info.rake +++ b/lib/tasks/statistic_subject_info.rake @@ -134,7 +134,6 @@ namespace :subjects do buffer_size += 1 if buffer_size == 1000 sql = "REPLACE INTO subject_user_infos(#{column_value}) VALUES #{str}" - puts sql ActiveRecord::Base.connection.execute sql str = "" buffer_size = 0 diff --git a/public/images/educoder/xcx/myinfobanner.png b/public/images/educoder/xcx/myinfobanner.png index ed1b10b30..e51ae7328 100644 Binary files a/public/images/educoder/xcx/myinfobanner.png and b/public/images/educoder/xcx/myinfobanner.png differ diff --git a/public/images/educoder/xcx/wxhonmeprompt.png b/public/images/educoder/xcx/wxhonmeprompt.png new file mode 100644 index 000000000..413241ad2 Binary files /dev/null and b/public/images/educoder/xcx/wxhonmeprompt.png differ diff --git a/public/images/educoder/xcx/wxshare.png b/public/images/educoder/xcx/wxshare.png new file mode 100644 index 000000000..84e106395 Binary files /dev/null and b/public/images/educoder/xcx/wxshare.png differ