作者 郭盛
1 个管道 的构建 通过 耗费 1 秒

修改老师订单

@@ -364,8 +364,8 @@ class Order extends Api @@ -364,8 +364,8 @@ class Order extends Api
364 "content"://问题描述 364 "content"://问题描述
365 "expirationtime"://到期时间 365 "expirationtime"://到期时间
366 "teacher_id"://老师ID 366 "teacher_id"://老师ID
367 - "name"://老师名称  
368 - "thumbnail"://头像 367 + "nickname"://学生名称
  368 + "avatar"://学生头像
369 "finish_status"://完成状态(1进行中2已完成3售后 369 "finish_status"://完成状态(1进行中2已完成3售后
370 "is_summarize"://是否总结过(1是2否 370 "is_summarize"://是否总结过(1是2否
371 "is_complaint"://是否被投诉(1是2否3已处理 371 "is_complaint"://是否被投诉(1是2否3已处理
@@ -394,64 +394,62 @@ class Order extends Api @@ -394,64 +394,62 @@ class Order extends Api
394 //进行中 394 //进行中
395 $data = Db::name('order') 395 $data = Db::name('order')
396 ->alias('a') 396 ->alias('a')
397 - ->join('teacher b','a.teacher_id = b.id') 397 + ->join('user b','a.user_id = b.id')
398 ->where('a.teacher_id',$teacher_id['id']) 398 ->where('a.teacher_id',$teacher_id['id'])
399 ->where('a.finish_status',1) 399 ->where('a.finish_status',1)
400 - ->field('a.*,b.name,b.thumbnail') 400 + ->field('a.*,b.nickname,b.avatar')
401 ->page($page,$pageNum) 401 ->page($page,$pageNum)
402 ->select(); 402 ->select();
403 }elseif ($type == 2){ 403 }elseif ($type == 2){
404 //待总结 404 //待总结
405 $data = Db::name('order') 405 $data = Db::name('order')
406 ->alias('a') 406 ->alias('a')
407 - ->join('teacher b','a.teacher_id = b.id') 407 + ->join('user b','a.user_id = b.id')
408 ->where('a.finish_status',2) 408 ->where('a.finish_status',2)
409 ->where('a.is_summarize',2) 409 ->where('a.is_summarize',2)
410 ->where('a.teacher_id',$teacher_id['id']) 410 ->where('a.teacher_id',$teacher_id['id'])
411 - ->field('a.*,b.name,b.thumbnail') 411 + ->field('a.*,b.nickname,b.avatar')
412 ->page($page,$pageNum) 412 ->page($page,$pageNum)
413 ->select(); 413 ->select();
414 }elseif ($type == 3){ 414 }elseif ($type == 3){
415 //结算中 415 //结算中
416 $data = Db::name('order') 416 $data = Db::name('order')
417 ->alias('a') 417 ->alias('a')
418 - ->join('teacher b','a.teacher_id = b.id') 418 + ->join('user b','a.user_id = b.id')
419 ->where('a.finish_status',2) 419 ->where('a.finish_status',2)
420 ->where('a.is_summarize',1) 420 ->where('a.is_summarize',1)
421 ->where('a.teacher_id',$teacher_id['id']) 421 ->where('a.teacher_id',$teacher_id['id'])
422 ->where('a.order_status',2) 422 ->where('a.order_status',2)
423 - ->field('a.*,b.name,b.thumbnail') 423 + ->field('a.*,b.nickname,b.avatar')
424 ->page($page,$pageNum) 424 ->page($page,$pageNum)
425 ->select(); 425 ->select();
426 }elseif ($type == 4){ 426 }elseif ($type == 4){
427 //已完成 427 //已完成
428 $data = Db::name('order') 428 $data = Db::name('order')
429 ->alias('a') 429 ->alias('a')
430 - ->join('teacher b','a.teacher_id = b.id') 430 + ->join('user b','a.user_id = b.id')
431 ->where('a.finish_status',2) 431 ->where('a.finish_status',2)
432 ->where('a.is_summarize',1) 432 ->where('a.is_summarize',1)
433 ->where('a.order_status',1) 433 ->where('a.order_status',1)
434 ->where('a.teacher_id',$teacher_id['id']) 434 ->where('a.teacher_id',$teacher_id['id'])
435 - ->field('a.*,b.name,b.thumbnail') 435 + ->field('a.*,b.nickname,b.avatar')
436 ->page($page,$pageNum) 436 ->page($page,$pageNum)
437 ->select(); 437 ->select();
438 }elseif ($type == 5 ){ 438 }elseif ($type == 5 ){
439 //退款/投诉 439 //退款/投诉
440 $data = Db::name('order') 440 $data = Db::name('order')
441 ->alias('a') 441 ->alias('a')
442 - ->join('teacher b','a.teacher_id = b.id') 442 + ->join('user b','a.user_id = b.id')
443 ->where('a.finish_status',3) 443 ->where('a.finish_status',3)
444 ->where('a.is_complaint',['=',1],['=',3],'or') 444 ->where('a.is_complaint',['=',1],['=',3],'or')
445 ->where('a.teacher_id',$teacher_id['id']) 445 ->where('a.teacher_id',$teacher_id['id'])
446 - ->field('a.*,b.name,b.thumbnail') 446 + ->field('a.*,b.nickname,b.avatar')
447 ->page($page,$pageNum) 447 ->page($page,$pageNum)
448 ->select(); 448 ->select();
449 }else{ 449 }else{
450 $this->error('类型有误'); 450 $this->error('类型有误');
451 } 451 }
452 foreach ($data as &$v){ 452 foreach ($data as &$v){
453 - $http = get_addon_config('qiniu')['cdnurl'];  
454 - $v['thumbnail'] = $http.$v['thumbnail'];  
455 $is_have = Db::name('comment') 453 $is_have = Db::name('comment')
456 ->where('order_id',$v['id']) 454 ->where('order_id',$v['id'])
457 ->find(); 455 ->find();
@@ -4366,8 +4366,8 @@ @@ -4366,8 +4366,8 @@
4366 "content"://问题描述 4366 "content"://问题描述
4367 "expirationtime"://到期时间 4367 "expirationtime"://到期时间
4368 "teacher_id"://老师ID 4368 "teacher_id"://老师ID
4369 - "name"://老师名称  
4370 - "thumbnail"://头像 4369 + "nickname"://学生名称
  4370 + "avatar"://学生头像
4371 "finish_status"://完成状态(1进行中2已完成3售后 4371 "finish_status"://完成状态(1进行中2已完成3售后
4372 "is_summarize"://是否总结过(1是2否 4372 "is_summarize"://是否总结过(1是2否
4373 "is_complaint"://是否被投诉(1是2否3已处理 4373 "is_complaint"://是否被投诉(1是2否3已处理
@@ -8450,7 +8450,7 @@ @@ -8450,7 +8450,7 @@
8450 8450
8451 <div class="row mt0 footer"> 8451 <div class="row mt0 footer">
8452 <div class="col-md-6" align="left"> 8452 <div class="col-md-6" align="left">
8453 - Generated on 2020-03-12 10:09:27 </div> 8453 + Generated on 2020-03-12 10:52:07 </div>
8454 <div class="col-md-6" align="right"> 8454 <div class="col-md-6" align="right">
8455 <a href="https://www.fastadmin.net" target="_blank">FastAdmin</a> 8455 <a href="https://www.fastadmin.net" target="_blank">FastAdmin</a>
8456 </div> 8456 </div>