...
|
...
|
@@ -83,7 +83,7 @@ class Item extends Backend |
|
|
$res = db('study_score_log l')
|
|
|
->join('study s', 's.id = l.study_id')
|
|
|
->where('item_id', $data['id'])
|
|
|
->field('l.study_id,sum(l.score) as sum_score,s.name,s.sno,s.team_id,s.school,s.grade')
|
|
|
->field('l.study_id,sum(l.score) as sum_score,s.name,s.unique,s.team_id,s.school,s.grade')
|
|
|
->group('l.study_id')
|
|
|
->order('sum_score', 'desc')
|
|
|
->select();
|
...
|
...
|
@@ -91,7 +91,7 @@ class Item extends Backend |
|
|
foreach ($res as $k => $v) {
|
|
|
$list[] = [
|
|
|
'name' => $v['name'],
|
|
|
'sno' => $v['sno'],
|
|
|
'unique' => $v['unique'],
|
|
|
'title' => db('team')->where('id',$v['team_id'])->value('title'),
|
|
|
'school' => $v['school'],
|
|
|
'grade' => $v['grade'],
|
...
|
...
|
|