正在显示
2 个修改的文件
包含
49 行增加
和
0 行删除
@@ -190,6 +190,55 @@ class Order extends Api | @@ -190,6 +190,55 @@ class Order extends Api | ||
190 | } | 190 | } |
191 | 191 | ||
192 | /** | 192 | /** |
193 | + * @ApiTitle (咨询信息) | ||
194 | + * @ApiSummary (咨询信息) | ||
195 | + * @ApiMethod (POST) | ||
196 | + * @ApiRoute (/api/order/consult) | ||
197 | + * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") | ||
198 | + * | ||
199 | + * @ApiParams (name="order_id", type="int", required=true, description="订单ID") | ||
200 | + * @ApiReturn({ | ||
201 | + "code": 1, | ||
202 | + "msg": "SUCCESS", | ||
203 | + "time": "1553839125", | ||
204 | + "data": { | ||
205 | + "business"://所属行业, | ||
206 | + "address"://经营地区/职能类别, | ||
207 | + "product"://产品/职位等级, | ||
208 | + "scale"://公司规模/下属人数, | ||
209 | + "content"://问题描述 | ||
210 | + "type"://1经营管理2职业发展 | ||
211 | + } | ||
212 | + }) | ||
213 | + */ | ||
214 | + public function consult() | ||
215 | + { | ||
216 | + $user_id = $this->getUserId(); | ||
217 | + $order_id = $this->request->param('order_id'); | ||
218 | + if(empty($order_id)){ | ||
219 | + $this->error('缺少必要参数'); | ||
220 | + } | ||
221 | + $data = Db::name('order') | ||
222 | + ->where('id',$order_id) | ||
223 | + ->find(); | ||
224 | + | ||
225 | + $info = Db::name('territory') | ||
226 | + ->alias('a') | ||
227 | + ->join('contype b','a.contype_id = b.id') | ||
228 | + ->where('a.id',$data['territory_id']) | ||
229 | + ->field('a.id,a.contype_id,b.type,b.title') | ||
230 | + ->find(); | ||
231 | + $list['business'] = $data['business']; | ||
232 | + $list['address'] = $data['address']; | ||
233 | + $list['product'] = $data['product']; | ||
234 | + $list['scale'] = $data['scale']; | ||
235 | + $list['content'] = $data['content']; | ||
236 | + $list['type'] = $info['type']; | ||
237 | + $this->success('success',$list); | ||
238 | + } | ||
239 | + | ||
240 | + | ||
241 | + /** | ||
193 | * @ApiTitle (续约订单支付) | 242 | * @ApiTitle (续约订单支付) |
194 | * @ApiSummary (续约订单支付) | 243 | * @ApiSummary (续约订单支付) |
195 | * @ApiMethod (POST) | 244 | * @ApiMethod (POST) |
此 diff 太大无法显示。
-
请 注册 或 登录 后发表评论