...
|
...
|
@@ -375,16 +375,7 @@ class Order extends Api |
|
|
$type = $this->request->param('type');
|
|
|
$page = $this->request->param('page', 1, 'intval');
|
|
|
$pageNum = $this->request->param('pageNum', 10, 'intval');
|
|
|
if($type == ''){
|
|
|
$data = Db::name('order')
|
|
|
->alias('a')
|
|
|
->join('teacher b','a.teacher_id = b.id')
|
|
|
->where('a.user_id',$user_id)
|
|
|
->field('a.*,b.name,b.thumbnail')
|
|
|
->order('id desc')
|
|
|
->page($page,$pageNum)
|
|
|
->select();
|
|
|
} elseif($type == 1){
|
|
|
if($type == '' || $type == 1){
|
|
|
$data = Db::name('order')
|
|
|
->alias('a')
|
|
|
->join('teacher b','a.teacher_id = b.id')
|
...
|
...
|
@@ -460,6 +451,59 @@ class Order extends Api |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (学生身份全部订单列表)
|
|
|
* @ApiSummary (学生身份订单列表)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiRoute (/api/order/quan)
|
|
|
*
|
|
|
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
|
|
|
*
|
|
|
*
|
|
|
* @ApiReturn({
|
|
|
"code": 1,
|
|
|
"msg": "成功",
|
|
|
"time": "1571492001",
|
|
|
"data": {
|
|
|
"id": //订单id,
|
|
|
"num"://订单号,
|
|
|
"content"://问题描述
|
|
|
"expirationtime"://到期时间
|
|
|
"teacher_id"://老师ID
|
|
|
"name"://老师名称
|
|
|
"thumbnail"://头像
|
|
|
"finish_status"://完成状态(1进行中2已完成3售后
|
|
|
"is_summarize"://是否总结过(1是2否
|
|
|
"is_complaint"://是否被投诉(1是2否3已处理
|
|
|
"is_comment"://是否评价过(1是2否
|
|
|
"right_status"://学生售后订单中的状态(1已处理2未处理
|
|
|
"chat_id"://房间id
|
|
|
"user"用户:{
|
|
|
"id"://融云id
|
|
|
"token"://融云token
|
|
|
},
|
|
|
"teacher"老师:{
|
|
|
"id"://融云id
|
|
|
"token"://融云token
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
*/
|
|
|
public function quan(){
|
|
|
$user_id = $this->getUserId();
|
|
|
$data = Db::name('order')
|
|
|
->alias('a')
|
|
|
->join('teacher b','a.teacher_id = b.id')
|
|
|
->where('a.user_id',$user_id)
|
|
|
->field('a.*,b.name,b.thumbnail')
|
|
|
->order('id desc')
|
|
|
->select();
|
|
|
if(empty($data)){
|
|
|
$this->error('暂无数据');
|
|
|
}
|
|
|
$this->success('success',$data);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (查看总结)
|
|
|
* @ApiSummary (查看总结)
|
|
|
* @ApiMethod (POST)
|
...
|
...
|
|