flowService = $flowService; } /** * [投流]创建订单 * * @description 创建教练投流订单 * * @bodyParam position_type integer required 位置类型(1:首页 2:列表页) Example: 1 * @bodyParam time_slot integer required 时间段(1:上午 2:下午 3:晚上) Example: 1 * @bodyParam days integer required 投放天数(可选值:1,7,15,30,90,180,365) Example: 7 * * @response { * "code": 0, * "message": "success", * "data": { * "order_id": 1, * "order_no": "FL202403201445201234", * "amount": "53.00" * } * } */ public function createOrder(Request $request) { $params = $request->validate([ 'position_type' => 'required|integer|in:1,2', 'time_slot' => 'required|integer|in:1,2,3', 'days' => 'required|integer|in:1,7,15,30,90,180,365', ]); $result = $this->flowService->createOrder(Auth::user()->id, $params); return $this->success($result); } /** * 技师投流-获取价格配置 * * @description 获取投流价格配置信息 * * @response { * "code": 200, * "message": "success", * "data": { * "time_slots": [ * {"type": 1, "name": "上午", "time": "6:00~12:00", "price": 4}, * {"type": 2, "name": "下午", "time": "12:00~18:00", "price": 6}, * {"type": 3, "name": "晚上", "time": "18:00~6:00", "price": 8} * ], * "days": [ * {"days": 1, "price": 12}, * {"days": 7, "price": 53}, * {"days": 15, "price": 99}, * {"days": 30, "price": 160}, * {"days": 90, "price": 430}, * {"days": 180, "price": 760}, * {"days": 365, "price": 1360} * ] * } * } */ public function getPriceConfig() { return $this->flowService->getPriceConfig(); } }