作者 何书鹏
1 个管道 的构建 通过 耗费 2 秒

代码bug修改

@@ -495,7 +495,7 @@ class Exam extends Api @@ -495,7 +495,7 @@ class Exam extends Api
495 ->where('user_id',$user_id) 495 ->where('user_id',$user_id)
496 ->where('study_id',$study_id) 496 ->where('study_id',$study_id)
497 ->where('exam_num',$study_exam_num) 497 ->where('exam_num',$study_exam_num)
498 - ->wherTime('createtime','month') 498 + ->whereTime('createtime','month')
499 ->update(['score'=>$score['num']]); 499 ->update(['score'=>$score['num']]);
500 } 500 }
501 }elseif ($type == 2){ 501 }elseif ($type == 2){
@@ -506,7 +506,7 @@ class Exam extends Api @@ -506,7 +506,7 @@ class Exam extends Api
506 ->where('type',2) 506 ->where('type',2)
507 ->where('question_id',$question_id) 507 ->where('question_id',$question_id)
508 ->where('study_exam_num',$study_exam_num) 508 ->where('study_exam_num',$study_exam_num)
509 - ->wherTime('createtime','month') 509 + ->whereTime('createtime','month')
510 ->find(); 510 ->find();
511 if(empty($data)){ 511 if(empty($data)){
512 $this->error('参数有误'); 512 $this->error('参数有误');
@@ -539,13 +539,13 @@ class Exam extends Api @@ -539,13 +539,13 @@ class Exam extends Api
539 ->where('study_id',$study_id) 539 ->where('study_id',$study_id)
540 ->where('study_exam_num',$study_exam_num) 540 ->where('study_exam_num',$study_exam_num)
541 ->field('sum(score) as num') 541 ->field('sum(score) as num')
542 - ->wherTime('createtime','month') 542 + ->whereTime('createtime','month')
543 ->find(); 543 ->find();
544 Db::name('third_exam') 544 Db::name('third_exam')
545 ->where('user_id',$user_id) 545 ->where('user_id',$user_id)
546 ->where('study_id',$study_id) 546 ->where('study_id',$study_id)
547 ->where('exam_num',$study_exam_num) 547 ->where('exam_num',$study_exam_num)
548 - ->wherTime('createtime','month') 548 + ->whereTime('createtime','month')
549 ->update(['score'=>$score['num']]); 549 ->update(['score'=>$score['num']]);
550 } 550 }
551 }elseif ($type == 3){ 551 }elseif ($type == 3){
@@ -556,7 +556,7 @@ class Exam extends Api @@ -556,7 +556,7 @@ class Exam extends Api
556 ->where('type',3) 556 ->where('type',3)
557 ->where('question_id',$question_id) 557 ->where('question_id',$question_id)
558 ->where('study_exam_num',$study_exam_num) 558 ->where('study_exam_num',$study_exam_num)
559 - ->wherTime('createtime','month') 559 + ->whereTime('createtime','month')
560 ->find(); 560 ->find();
561 if(empty($data)){ 561 if(empty($data)){
562 $this->error('参数有误'); 562 $this->error('参数有误');
@@ -576,14 +576,14 @@ class Exam extends Api @@ -576,14 +576,14 @@ class Exam extends Api
576 ->where('user_id',$user_id) 576 ->where('user_id',$user_id)
577 ->where('study_id',$study_id) 577 ->where('study_id',$study_id)
578 ->where('study_exam_num',$study_exam_num) 578 ->where('study_exam_num',$study_exam_num)
579 - ->wherTime('createtime','month') 579 + ->whereTime('createtime','month')
580 ->field('sum(score) as num') 580 ->field('sum(score) as num')
581 ->find(); 581 ->find();
582 Db::name('third_exam') 582 Db::name('third_exam')
583 ->where('user_id',$user_id) 583 ->where('user_id',$user_id)
584 ->where('study_id',$study_id) 584 ->where('study_id',$study_id)
585 ->where('exam_num',$study_exam_num) 585 ->where('exam_num',$study_exam_num)
586 - ->wherTime('createtime','month') 586 + ->whereTime('createtime','month')
587 ->update(['score'=>$score['num']]); 587 ->update(['score'=>$score['num']]);
588 } 588 }
589 } 589 }
@@ -561,7 +561,7 @@ class User extends Api @@ -561,7 +561,7 @@ class User extends Api
561 $third_exam = Db::name('third_exam') 561 $third_exam = Db::name('third_exam')
562 ->where('user_id',$user_id) 562 ->where('user_id',$user_id)
563 ->where('study_id',$id) 563 ->where('study_id',$id)
564 - ->wherTime('createtime','month') 564 + ->whereTime('createtime','month')
565 ->order('exam_num desc') 565 ->order('exam_num desc')
566 ->find(); 566 ->find();
567 567