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

查看总结接口

... ... @@ -368,7 +368,7 @@ class Order extends Api
->alias('a')
->join('teacher b','a.teacher_id = b.id')
->where('a.finish_status',3)
->where('a.is_complaint',['=',1],['=',3],'or')
// ->where('a.is_complaint',['=',1],['=',3],'or')
->where('a.user_id',$user_id)
->field('a.*,b.name,b.thumbnail')
->page($page,$pageNum)
... ... @@ -417,6 +417,47 @@ class Order extends Api
$this->success('success',$data);
}
/**
* @ApiTitle (查看总结)
* @ApiSummary (查看总结)
* @ApiMethod (POST)
* @ApiRoute (/api/order/select)
*
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
*
* @ApiParams (name="order_id", type="int", required=true, description="订单ID")
*
* @ApiReturn({
"code": 1,
"msg": "成功",
"time": "1571492001",
"data": {
'id'://总结ID
"background"://背景
"questions"://问题
"Research"://调研
"analyze"://分析
"conclusion"://结论
"plana"://方案一
"planb"://方案二
"planc"://方案三
}
})
*/
public function select()
{
$user_id = $this->getUserId();
$order_id = $this->request->param('order_id');
if(empty($order_id)){
$this->error('缺少必要参数');
}
$data = Db::name('summarize')
->where('order_id',$order_id)
->field('order_id,createtime',true)
->find();
$this->success('success',$data);
}
/**
* @ApiTitle (老师身份我的订单列表)
... ...
此 diff 太大无法显示。