作者 xiaohu thinkpad

预约时间错误

此 diff 太大无法显示。
@@ -71,7 +71,7 @@ class CommentController extends UserBaseController @@ -71,7 +71,7 @@ class CommentController extends UserBaseController
71 $dataa['comment'] = $data['comment']; 71 $dataa['comment'] = $data['comment'];
72 $dataa['type'] = $data['type']; 72 $dataa['type'] = $data['type'];
73 $re = Db::name('commente')->insert($dataa); 73 $re = Db::name('commente')->insert($dataa);
74 - $res = Db::name('yuyue')->where(['id'=>$data['yuyue_id']])->update(['status'=>'3']); 74 + $res = Db::name('yuyue')->where(['id'=>$data['yuyue_id']])->update(['status'=>'3','pingjia_xueyuan'=>'1']);
75 //echo Db::name('yuyue')->getLastSql(); 75 //echo Db::name('yuyue')->getLastSql();
76 76
77 if($re){ 77 if($re){
@@ -186,7 +186,7 @@ class CommentController extends UserBaseController @@ -186,7 +186,7 @@ class CommentController extends UserBaseController
186 $data['comment'] = $comment; 186 $data['comment'] = $comment;
187 $data['create_time'] = time(); 187 $data['create_time'] = time();
188 $re = DB::name('commente1')->insert($data); 188 $re = DB::name('commente1')->insert($data);
189 - DB::name('yuyue')->where(['id'=>$id])->update(['status'=>'3']); 189 + $res = Db::name('yuyue')->where(['id'=>$data['yuyue_id']])->update(['status'=>'3','pingjia_xueyuan'=>'1']);
190 if($re){ 190 if($re){
191 return json(['code'=>'1','msg'=>'评价成功']); 191 return json(['code'=>'1','msg'=>'评价成功']);
192 }else{ 192 }else{
@@ -435,7 +435,11 @@ class YuyueController extends UserBaseController @@ -435,7 +435,11 @@ class YuyueController extends UserBaseController
435 ->order('create_time desc') 435 ->order('create_time desc')
436 ->select() 436 ->select()
437 ->toArray(); 437 ->toArray();
438 - 438 + foreach ($data as $k => $v) {
  439 + if ($v['status'] == '3' && $v['pingjia_xueyuan'] != '1') {
  440 + $data[$k]['status'] = '2';
  441 + }
  442 + }
439 443
440 $data1 = Db::name('yuyue') 444 $data1 = Db::name('yuyue')
441 ->alias('yy') 445 ->alias('yy')
@@ -459,11 +463,16 @@ class YuyueController extends UserBaseController @@ -459,11 +463,16 @@ class YuyueController extends UserBaseController
459 ->alias('yy') 463 ->alias('yy')
460 ->join('qnb_user u', 'u.id=yy.uid') 464 ->join('qnb_user u', 'u.id=yy.uid')
461 ->where(['teach_id' => $id]) 465 ->where(['teach_id' => $id])
462 - ->where(['yy.status' => '2']) 466 + ->where(['yy.status' => ['in','2,3']])
463 ->field('yy.*,u.user_nickname,u.headimgurl,u.id as tech_id,u.kemu as gname') 467 ->field('yy.*,u.user_nickname,u.headimgurl,u.id as tech_id,u.kemu as gname')
464 ->order('create_time desc') 468 ->order('create_time desc')
465 ->select() 469 ->select()
466 ->toArray(); 470 ->toArray();
  471 + foreach ($data3 as $k => $v) {
  472 + if ($v['status'] == '3' && $v['pingjia_xueyuan'] == '1') {
  473 + unset ($data3[$k]);
  474 + }
  475 + }
467 $data4 = Db::name('yuyue') 476 $data4 = Db::name('yuyue')
468 ->alias('yy') 477 ->alias('yy')
469 ->join('qnb_user u', 'u.id=yy.uid') 478 ->join('qnb_user u', 'u.id=yy.uid')