正在显示
2 个修改的文件
包含
33 行增加
和
0 行删除
@@ -163,6 +163,39 @@ class Order extends Api | @@ -163,6 +163,39 @@ class Order extends Api | ||
163 | } | 163 | } |
164 | 164 | ||
165 | /** | 165 | /** |
166 | + * @ApiTitle (延长对话) | ||
167 | + * @ApiSummary (延长对话) | ||
168 | + * @ApiMethod (POST) | ||
169 | + * @ApiRoute (/api/order/lengthen) | ||
170 | + * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") | ||
171 | + * | ||
172 | + * @ApiParams (name="order_id", type="int", required=true, description="订单ID") | ||
173 | + | ||
174 | + * @ApiReturn({ | ||
175 | + "code": 1, | ||
176 | + "msg": "SUCCESS", | ||
177 | + "time": "1553839125", | ||
178 | + }) | ||
179 | + */ | ||
180 | + public function lengthen() | ||
181 | + { | ||
182 | + $user_id = $this->getUserId(); | ||
183 | + $order_id = $this->request->param('order_id'); | ||
184 | + if(empty($order_id)){ | ||
185 | + $this->error('缺少必要参数'); | ||
186 | + } | ||
187 | + $res = Db::name('order') | ||
188 | + ->where('id',$order_id) | ||
189 | + ->setInc('expirationtime',86400); | ||
190 | + if(empty($res)){ | ||
191 | + $this->error('失败'); | ||
192 | + }else{ | ||
193 | + $this->success('成功'); | ||
194 | + } | ||
195 | + } | ||
196 | + | ||
197 | + | ||
198 | + /** | ||
166 | * @ApiTitle (续约规则) | 199 | * @ApiTitle (续约规则) |
167 | * @ApiSummary (续约规则) | 200 | * @ApiSummary (续约规则) |
168 | * @ApiMethod (POST) | 201 | * @ApiMethod (POST) |
此 diff 太大无法显示。
-
请 注册 或 登录 后发表评论