作者 开飞机的舒克

扫码加分问题修改

@@ -207,7 +207,8 @@ class Bind extends Api @@ -207,7 +207,8 @@ class Bind extends Api
207 $this->error('参数错误', ['status' => 2]); 207 $this->error('参数错误', ['status' => 2]);
208 } 208 }
209 $model = new StudyScoreLog(); 209 $model = new StudyScoreLog();
210 - $model->addScore($id,$unique); 210 + $res = $model->addScore($id,$unique);
  211 + //halt($res);
211 $data = db('study')->where('unique', $unique)->field('name,gender')->find(); 212 $data = db('study')->where('unique', $unique)->field('name,gender')->find();
212 if ($data['gender'] == 1){ 213 if ($data['gender'] == 1){
213 $data['gender'] = '男'; 214 $data['gender'] = '男';
@@ -124,7 +124,7 @@ class StudyScoreLog extends Model @@ -124,7 +124,7 @@ class StudyScoreLog extends Model
124 }else{ 124 }else{
125 \db('team_score') 125 \db('team_score')
126 ->where(['ronda_id'=>$ronda['id'],'team_id'=>$team['id']]) 126 ->where(['ronda_id'=>$ronda['id'],'team_id'=>$team['id']])
127 - ->update(['score'=>($team_score+ $sum_score)]); 127 + ->update(['score'=> ($team_score['score'] + $sum_score)]);
128 } 128 }
129 //学生维度得分 129 //学生维度得分
130 foreach ($list as $key => $value) { 130 foreach ($list as $key => $value) {
@@ -134,7 +134,7 @@ class StudyScoreLog extends Model @@ -134,7 +134,7 @@ class StudyScoreLog extends Model
134 $resc = [ 134 $resc = [
135 'study_id' => $stu['id'], 135 'study_id' => $stu['id'],
136 'radar_id' => $value['radar'], 136 'radar_id' => $value['radar'],
137 - 'campus_ids' => $ronda['campus_id'], 137 + 'campus_id' => $ronda['campus_id'],
138 'score' => $value['score'], 138 'score' => $value['score'],
139 'createtime' => time() 139 'createtime' => time()
140 ]; 140 ];