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

修改学生订单

@@ -397,7 +397,7 @@ class Order extends Api @@ -397,7 +397,7 @@ class Order extends Api
397 * 397 *
398 * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") 398 * @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
399 * 399 *
400 - * @ApiParams (name="type", type="int", required=false, description="类型(如果为空或者为1是进行中 2是已完成3是售后)") 400 + * @ApiParams (name="type", type="int", required=false, description="类型(如果为空或者为1是进行中 2是已完成3是售后4待总结5已总结)")
401 * @ApiParams (name="page", type="inter", required=false, description="当前页(默认1)") 401 * @ApiParams (name="page", type="inter", required=false, description="当前页(默认1)")
402 * @ApiParams (name="pageNum", type="inter", required=false, description="每页显示数据个数(默认10)") 402 * @ApiParams (name="pageNum", type="inter", required=false, description="每页显示数据个数(默认10)")
403 * 403 *
@@ -488,7 +488,28 @@ class Order extends Api @@ -488,7 +488,28 @@ class Order extends Api
488 'token' => '' 488 'token' => ''
489 ]; 489 ];
490 } 490 }
491 - }else{ 491 + }elseif ($type == 4){
  492 + $data = Db::name('order')
  493 + ->alias('a')
  494 + ->join('teacher b','a.teacher_id = b.id')
  495 + ->where('a.user_id',$user_id)
  496 + ->where('a.finish_status',2)
  497 + ->field('a.*,b.name,b.thumbnail')
  498 + ->order('id desc')
  499 + ->page($page,$pageNum)
  500 + ->select();
  501 + }elseif ($type == 5){
  502 + $data = Db::name('order')
  503 + ->alias('a')
  504 + ->join('teacher b','a.teacher_id = b.id')
  505 + ->where('a.user_id',$user_id)
  506 + ->where('a.finish_status',3)
  507 + ->field('a.*,b.name,b.thumbnail')
  508 + ->order('id desc')
  509 + ->page($page,$pageNum)
  510 + ->select();
  511 + }
  512 + else{
492 $this->error('类型有误'); 513 $this->error('类型有误');
493 } 514 }
494 foreach ($data as &$v){ 515 foreach ($data as &$v){
@@ -303,6 +303,16 @@ class User extends Api @@ -303,6 +303,16 @@ class User extends Api
303 ->where('user_id',$user_id) 303 ->where('user_id',$user_id)
304 ->where('finish_status',1) 304 ->where('finish_status',1)
305 ->count(); 305 ->count();
  306 + //待总结
  307 + $data['summarize'] = Db::name('order')
  308 + ->where('user_id',$user_id)
  309 + ->where('finish_status',2)
  310 + ->count();
  311 + //结算/已总结
  312 + $data['summarize'] = Db::name('order')
  313 + ->where('user_id',$user_id)
  314 + ->where('finish_status',3)
  315 + ->count();
306 $data['finish'] = Db::name('order') 316 $data['finish'] = Db::name('order')
307 ->where('user_id',$user_id) 317 ->where('user_id',$user_id)
308 ->where('finish_status',5) 318 ->where('finish_status',5)
@@ -4681,7 +4681,7 @@ @@ -4681,7 +4681,7 @@
4681 <td>type</td> 4681 <td>type</td>
4682 <td>int</td> 4682 <td>int</td>
4683 <td></td> 4683 <td></td>
4684 - <td>类型(如果为空或者为1是进行中 2是已完成3是售后</td> 4684 + <td>类型(如果为空或者为1是进行中 2是已完成3是售后4待总结5已总结</td>
4685 </tr> 4685 </tr>
4686 <tr> 4686 <tr>
4687 <td>page</td> 4687 <td>page</td>
@@ -4726,7 +4726,7 @@ @@ -4726,7 +4726,7 @@
4726 <form enctype="application/x-www-form-urlencoded" role="form" action="/api/order/orderList" method="POST" name="form32" id="form32"> 4726 <form enctype="application/x-www-form-urlencoded" role="form" action="/api/order/orderList" method="POST" name="form32" id="form32">
4727 <div class="form-group"> 4727 <div class="form-group">
4728 <label class="control-label" for="type">type</label> 4728 <label class="control-label" for="type">type</label>
4729 - <input type="int" class="form-control input-sm" id="type" placeholder="类型(如果为空或者为1是进行中 2是已完成3是售后" name="type"> 4729 + <input type="int" class="form-control input-sm" id="type" placeholder="类型(如果为空或者为1是进行中 2是已完成3是售后4待总结5已总结" name="type">
4730 </div> 4730 </div>
4731 <div class="form-group"> 4731 <div class="form-group">
4732 <label class="control-label" for="page">page</label> 4732 <label class="control-label" for="page">page</label>
@@ -9579,7 +9579,7 @@ @@ -9579,7 +9579,7 @@
9579 9579
9580 <div class="row mt0 footer"> 9580 <div class="row mt0 footer">
9581 <div class="col-md-6" align="left"> 9581 <div class="col-md-6" align="left">
9582 - Generated on 2020-03-20 17:52:12 </div> 9582 + Generated on 2020-03-20 18:27:55 </div>
9583 <div class="col-md-6" align="right"> 9583 <div class="col-md-6" align="right">
9584 <a href="https://www.fastadmin.net" target="_blank">FastAdmin</a> 9584 <a href="https://www.fastadmin.net" target="_blank">FastAdmin</a>
9585 </div> 9585 </div>