...
|
...
|
@@ -100,6 +100,63 @@ class Order extends Api |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (订单详情)
|
|
|
* @ApiSummary (订单详情)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiRoute (/api/order/orderdetail)
|
|
|
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
|
|
|
* @ApiParams (name="order_id", type="int", required=true, description="订单ID")
|
|
|
* @ApiReturn({
|
|
|
"code": 1,
|
|
|
"msg": "SUCCESS",
|
|
|
"time": "1553839125",
|
|
|
"data": {
|
|
|
"id"://订单id,
|
|
|
"user_id"://学生ID
|
|
|
"teacher_id"://老师ID
|
|
|
"territory_id"://购买的擅长领域ID
|
|
|
"is_use"://是否使用优惠劵(0不使用1使用
|
|
|
"coupon_id"://优惠劵ID
|
|
|
"money"://金额
|
|
|
"status"://订单状态
|
|
|
"num"://订单号
|
|
|
"business"://所属行业
|
|
|
"address"://经营地区/职能类别
|
|
|
"product"://产品/职位等级
|
|
|
"scale"://公司规模/下属人数
|
|
|
"content"://问题描述
|
|
|
"commission"://佣金比例
|
|
|
"finish_status"://完成状态(1进行中2已完成3售后
|
|
|
"order_status"://订单审核(1通过2未通过
|
|
|
"is_summarize"://是否总结过(1是2否
|
|
|
"is_complaint"://是否投诉(1是2否3已处理
|
|
|
"is_chargeback"://是否退单(1是2否
|
|
|
"expirationtime"://到期时间
|
|
|
"paytime"://支付时间
|
|
|
"chat_id"://融云群聊ID
|
|
|
"chat_name"://群组名称
|
|
|
"transaction_id"://微信支付订单号
|
|
|
}
|
|
|
})
|
|
|
*/
|
|
|
public function orderdetail()
|
|
|
{
|
|
|
$user_id = $this->getUserId();
|
|
|
$order_id = $this->request->param('order_id');
|
|
|
if(empty($order_id)){
|
|
|
$this->error('缺少必要参数');
|
|
|
}
|
|
|
$data = Db::name('order')->where('id',$order_id)->find();
|
|
|
if(!empty($data['paytime'])){
|
|
|
$data['paytime'] = date('Y-m-d H:i',$data['paytime']);
|
|
|
}
|
|
|
if(!empty($data['expirationtime'])){
|
|
|
$data['expirationtime'] = date('Y-m-d H:i',$data['expirationtime']);
|
|
|
}
|
|
|
$this->success('success',$data);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (续约订单)
|
|
|
* @ApiSummary (续约订单)
|
|
|
* @ApiMethod (POST)
|
...
|
...
|
|