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

修改学生订单

... ... @@ -397,7 +397,7 @@ class Order extends Api
*
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
*
* @ApiParams (name="type", type="int", required=false, description="类型(如果为空或者为1是进行中 2是已完成3是售后)")
* @ApiParams (name="type", type="int", required=false, description="类型(如果为空或者为1是进行中 2是已完成3是售后4待总结5已总结)")
* @ApiParams (name="page", type="inter", required=false, description="当前页(默认1)")
* @ApiParams (name="pageNum", type="inter", required=false, description="每页显示数据个数(默认10)")
*
... ... @@ -488,7 +488,28 @@ class Order extends Api
'token' => ''
];
}
}else{
}elseif ($type == 4){
$data = Db::name('order')
->alias('a')
->join('teacher b','a.teacher_id = b.id')
->where('a.user_id',$user_id)
->where('a.finish_status',2)
->field('a.*,b.name,b.thumbnail')
->order('id desc')
->page($page,$pageNum)
->select();
}elseif ($type == 5){
$data = Db::name('order')
->alias('a')
->join('teacher b','a.teacher_id = b.id')
->where('a.user_id',$user_id)
->where('a.finish_status',3)
->field('a.*,b.name,b.thumbnail')
->order('id desc')
->page($page,$pageNum)
->select();
}
else{
$this->error('类型有误');
}
foreach ($data as &$v){
... ...
... ... @@ -303,6 +303,16 @@ class User extends Api
->where('user_id',$user_id)
->where('finish_status',1)
->count();
//待总结
$data['summarize'] = Db::name('order')
->where('user_id',$user_id)
->where('finish_status',2)
->count();
//结算/已总结
$data['summarize'] = Db::name('order')
->where('user_id',$user_id)
->where('finish_status',3)
->count();
$data['finish'] = Db::name('order')
->where('user_id',$user_id)
->where('finish_status',5)
... ...
... ... @@ -4681,7 +4681,7 @@
<td>type</td>
<td>int</td>
<td></td>
<td>类型(如果为空或者为1是进行中 2是已完成3是售后</td>
<td>类型(如果为空或者为1是进行中 2是已完成3是售后4待总结5已总结</td>
</tr>
<tr>
<td>page</td>
... ... @@ -4726,7 +4726,7 @@
<form enctype="application/x-www-form-urlencoded" role="form" action="/api/order/orderList" method="POST" name="form32" id="form32">
<div class="form-group">
<label class="control-label" for="type">type</label>
<input type="int" class="form-control input-sm" id="type" placeholder="类型(如果为空或者为1是进行中 2是已完成3是售后" name="type">
<input type="int" class="form-control input-sm" id="type" placeholder="类型(如果为空或者为1是进行中 2是已完成3是售后4待总结5已总结" name="type">
</div>
<div class="form-group">
<label class="control-label" for="page">page</label>
... ... @@ -9579,7 +9579,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2020-03-20 17:52:12 </div>
Generated on 2020-03-20 18:27:55 </div>
<div class="col-md-6" align="right">
<a href="https://www.fastadmin.net" target="_blank">FastAdmin</a>
</div>
... ...