chunjie_config_stat_controller.rb 965 B

123456789101112131415161718192021222324252627282930313233
  1. # encoding:utf-8
  2. class ChunjieConfigStatController < BaseController
  3. before_filter :authenticate_admin_user!
  4. def index
  5. # 活动ID
  6. pid = params[:id].to_i
  7. # 活动名称
  8. @title = '春节快乐'
  9. #已经发放的红包金额
  10. @hongbaoTotalMoney = 20000
  11. #参与人数:
  12. @total_join = 50000000
  13. #新增注册用户数:
  14. @total_new_register = 60000000
  15. #新增关注:
  16. @total_new_sub = 70000
  17. render :layout => false
  18. end
  19. #项目投资排名
  20. # def rank
  21. # pid = params[:id].to_i
  22. # @project = Project.where("id=?",pid).first
  23. # sql = "select sum(j.total_price) as investment, j.user_id, j.paied_at as invest_time,u.real_name,u.tel from d5c_project_joins j,d5c_users u where j.user_id=u.id and j.project_id = #{pid} and j.state = 1 and j.is_refunded = 0 and j.is_deleted = 0 group by j.user_id order by invest_time asc, j.created_at asc";
  24. # @items = ProjectJoin.find_by_sql(sql)
  25. # end
  26. end