| xqd
@@ -353,11 +353,21 @@ class Special extends ModelBasic
|
|
|
->group('a.id')->where('uid', $where['uid']);
|
|
|
} else {
|
|
|
$model = self::PreWhere();
|
|
|
- if ($where['subject_id'] && $where['grade_id'] > 0) {
|
|
|
- $model = $model->where('subject_id', $where['subject_id']);
|
|
|
- } else if ($where['subject_id'] == 0 && $where['grade_id'] > 0) {
|
|
|
- $subject_ids = SpecialSubject::subjectId($where['grade_id']);
|
|
|
- $model = $model->where('subject_id', 'in', $subject_ids);
|
|
|
+ if ($where['grade_id'] == 64) {
|
|
|
+ if ($where['subject_id'] == 65) {
|
|
|
+ $model = $model->where('isnew', 1);
|
|
|
+ } elseif ($where['subject_id'] == 66) {
|
|
|
+ $model = $model->where('ishot', 1);
|
|
|
+ } else {
|
|
|
+ $model = $model->where('ishot|isnew', 1);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if ($where['subject_id'] && $where['grade_id'] > 0) {
|
|
|
+ $model = $model->where('subject_id', $where['subject_id']);
|
|
|
+ } else if ($where['subject_id'] == 0 && $where['grade_id'] > 0) {
|
|
|
+ $subject_ids = SpecialSubject::subjectId($where['grade_id']);
|
|
|
+ $model = $model->where('subject_id', 'in', $subject_ids);
|
|
|
+ }
|
|
|
}
|
|
|
if ($where['search']) {
|
|
|
$model = $model->where('title|abstract', 'LIKE', "%$where[search]%");
|