...
|
...
|
@@ -495,7 +495,7 @@ class Exam extends Api |
|
|
->where('user_id',$user_id)
|
|
|
->where('study_id',$study_id)
|
|
|
->where('exam_num',$study_exam_num)
|
|
|
->wherTime('createtime','month')
|
|
|
->whereTime('createtime','month')
|
|
|
->update(['score'=>$score['num']]);
|
|
|
}
|
|
|
}elseif ($type == 2){
|
...
|
...
|
@@ -506,7 +506,7 @@ class Exam extends Api |
|
|
->where('type',2)
|
|
|
->where('question_id',$question_id)
|
|
|
->where('study_exam_num',$study_exam_num)
|
|
|
->wherTime('createtime','month')
|
|
|
->whereTime('createtime','month')
|
|
|
->find();
|
|
|
if(empty($data)){
|
|
|
$this->error('参数有误');
|
...
|
...
|
@@ -539,13 +539,13 @@ class Exam extends Api |
|
|
->where('study_id',$study_id)
|
|
|
->where('study_exam_num',$study_exam_num)
|
|
|
->field('sum(score) as num')
|
|
|
->wherTime('createtime','month')
|
|
|
->whereTime('createtime','month')
|
|
|
->find();
|
|
|
Db::name('third_exam')
|
|
|
->where('user_id',$user_id)
|
|
|
->where('study_id',$study_id)
|
|
|
->where('exam_num',$study_exam_num)
|
|
|
->wherTime('createtime','month')
|
|
|
->whereTime('createtime','month')
|
|
|
->update(['score'=>$score['num']]);
|
|
|
}
|
|
|
}elseif ($type == 3){
|
...
|
...
|
@@ -556,7 +556,7 @@ class Exam extends Api |
|
|
->where('type',3)
|
|
|
->where('question_id',$question_id)
|
|
|
->where('study_exam_num',$study_exam_num)
|
|
|
->wherTime('createtime','month')
|
|
|
->whereTime('createtime','month')
|
|
|
->find();
|
|
|
if(empty($data)){
|
|
|
$this->error('参数有误');
|
...
|
...
|
@@ -576,14 +576,14 @@ class Exam extends Api |
|
|
->where('user_id',$user_id)
|
|
|
->where('study_id',$study_id)
|
|
|
->where('study_exam_num',$study_exam_num)
|
|
|
->wherTime('createtime','month')
|
|
|
->whereTime('createtime','month')
|
|
|
->field('sum(score) as num')
|
|
|
->find();
|
|
|
Db::name('third_exam')
|
|
|
->where('user_id',$user_id)
|
|
|
->where('study_id',$study_id)
|
|
|
->where('exam_num',$study_exam_num)
|
|
|
->wherTime('createtime','month')
|
|
|
->whereTime('createtime','month')
|
|
|
->update(['score'=>$score['num']]);
|
|
|
}
|
|
|
}
|
...
|
...
|
|