...
|
...
|
@@ -163,6 +163,39 @@ class Order extends Api |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (延长对话)
|
|
|
* @ApiSummary (延长对话)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiRoute (/api/order/lengthen)
|
|
|
* @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",
|
|
|
})
|
|
|
*/
|
|
|
public function lengthen()
|
|
|
{
|
|
|
$user_id = $this->getUserId();
|
|
|
$order_id = $this->request->param('order_id');
|
|
|
if(empty($order_id)){
|
|
|
$this->error('缺少必要参数');
|
|
|
}
|
|
|
$res = Db::name('order')
|
|
|
->where('id',$order_id)
|
|
|
->setInc('expirationtime',86400);
|
|
|
if(empty($res)){
|
|
|
$this->error('失败');
|
|
|
}else{
|
|
|
$this->success('成功');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (续约规则)
|
|
|
* @ApiSummary (续约规则)
|
|
|
* @ApiMethod (POST)
|
...
|
...
|
|