...
|
...
|
@@ -41,16 +41,12 @@ class Screen extends Api |
|
|
->each(function ($item,$key){
|
|
|
$item['team_name'] = db('team')->where('id',$item['team_id'])->value('title');
|
|
|
$item['team_score'] = $item['score'];
|
|
|
// $item['score'] = floor($item['sum_score']);
|
|
|
// $item['study'] = db('study_score_log l')
|
|
|
// ->distinct('l.study_id')
|
|
|
// ->join('study s','l.study_id = s.id')
|
|
|
// ->whereIn('l.campus_ids',$item['campus_ids'])
|
|
|
// ->where('s.team',$item['team'])
|
|
|
// ->field('s.name,sum(score) as sum_score')
|
|
|
// ->order('sum_score','desc')
|
|
|
// ->group('study_id')
|
|
|
// ->select();
|
|
|
$item['study'] = db('study_ronda_score l')
|
|
|
->join('study s','l.sid = s.id')
|
|
|
->where('l.team_id',$item['team_id'])
|
|
|
->field('s.name,score,l.*')
|
|
|
->order('score','desc')
|
|
|
->select();
|
|
|
return $item;
|
|
|
});
|
|
|
$this->success('获取成功',$list);
|
...
|
...
|
|