作者 xiaohu thinkpad

预约时间错误

此 diff 太大无法显示。
... ... @@ -71,7 +71,7 @@ class CommentController extends UserBaseController
$dataa['comment'] = $data['comment'];
$dataa['type'] = $data['type'];
$re = Db::name('commente')->insert($dataa);
$res = Db::name('yuyue')->where(['id'=>$data['yuyue_id']])->update(['status'=>'3']);
$res = Db::name('yuyue')->where(['id'=>$data['yuyue_id']])->update(['status'=>'3','pingjia_xueyuan'=>'1']);
//echo Db::name('yuyue')->getLastSql();
if($re){
... ... @@ -186,7 +186,7 @@ class CommentController extends UserBaseController
$data['comment'] = $comment;
$data['create_time'] = time();
$re = DB::name('commente1')->insert($data);
DB::name('yuyue')->where(['id'=>$id])->update(['status'=>'3']);
$res = Db::name('yuyue')->where(['id'=>$data['yuyue_id']])->update(['status'=>'3','pingjia_xueyuan'=>'1']);
if($re){
return json(['code'=>'1','msg'=>'评价成功']);
}else{
... ...
... ... @@ -435,7 +435,11 @@ class YuyueController extends UserBaseController
->order('create_time desc')
->select()
->toArray();
foreach ($data as $k => $v) {
if ($v['status'] == '3' && $v['pingjia_xueyuan'] != '1') {
$data[$k]['status'] = '2';
}
}
$data1 = Db::name('yuyue')
->alias('yy')
... ... @@ -459,11 +463,16 @@ class YuyueController extends UserBaseController
->alias('yy')
->join('qnb_user u', 'u.id=yy.uid')
->where(['teach_id' => $id])
->where(['yy.status' => '2'])
->where(['yy.status' => ['in','2,3']])
->field('yy.*,u.user_nickname,u.headimgurl,u.id as tech_id,u.kemu as gname')
->order('create_time desc')
->select()
->toArray();
foreach ($data3 as $k => $v) {
if ($v['status'] == '3' && $v['pingjia_xueyuan'] == '1') {
unset ($data3[$k]);
}
}
$data4 = Db::name('yuyue')
->alias('yy')
->join('qnb_user u', 'u.id=yy.uid')
... ...