From 7dbd20e5eb0b70936936ecda2954d3e10217995a Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 15 Apr 2015 10:27:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=B7=E6=96=B0=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=97=B6=E5=8F=AA=E8=AF=84=E8=AE=BA=E6=9C=AA=E8=AF=84?= =?UTF-8?q?=E5=88=86=E8=A1=A8=E7=9A=84=E4=BD=9C=E5=93=81=E5=9C=A8=E5=B7=B2?= =?UTF-8?q?=E8=AF=84=E5=88=97=E8=A1=A8=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/bids_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 21b3cc531..d38846ea0 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -490,7 +490,7 @@ class BidsController < ApplicationController (SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND is_teacher_score = 1 AND stars IS NOT NULL ORDER BY updated_at DESC limit 0,1) AS t_score, (SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND is_teacher_score = 0) AS s_score FROM homework_attaches WHERE bid_id = #{@bid.id} ORDER BY s_score DESC,created_at ASC) AS table1 - WHERE table1.t_score IS NULL") + WHERE table1.t_score IS NULL OR table1.t_score = 0") @not_batch_homework = true @cur_type = 1 else