all(),[ 'start_date' => 'required|date', 'end_date' => 'required|date', 'closing_date' => 'nullable|date', 'page' => 'required|numeric', 'page_size' => 'required|numeric', 'playlet_id' => 'nullable|numeric', 'plat_order_type' => 'nullable|in:0,1' ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $params['start_date'] = $request->input('start_date'); $params['end_date'] = $request->input('end_date'); $params['sys_group_id'] = $request->input('sys_group_id'); $params['playlet_id'] = $request->input('playlet_id', null); $params['closing_date'] = $request->input('closing_date', null); $params['plat_order_type'] = $request->input('plat_order_type', null); $params['cost_cover_min'] = $request->input('cost_cover_min', null); $params['cost_cover_max'] = $request->input('cost_cover_max', null); $page = $request->input('page', 1); $pageSize = $request->input('page_size', 20); $sortField = $request->input('sort_field', 'ref_date'); $sortType = $request->input('sort_type', 'desc'); list($count, $list, $retrieveColumns) = ShortPlayDataTrendService::adqShortPlayDataTrendList($params, $page, $pageSize, $sortField, $sortType); return self::returnPageValue($list, $count, $pageSize, $page, $retrieveColumns); } public function adqSummaryOfShortDramaDataTrends(Request $request) { $validator = \Validator::make($request->all(),[ 'start_date' => 'required|date', 'end_date' => 'required|date', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $params['playlet_id'] = $request->input('playlet_id'); $params['start_date'] = $request->input('start_date'); $params['end_date'] = $request->input('end_date'); $params['closing_date'] = $request->input('closing_date'); $params['sys_group_id'] = $request->input('sys_group_id'); $params['plat_order_type'] = $request->input('plat_order_type'); // 0:小程序 1:h5 $params['cost_cover_min'] = $request->input('cost_cover_min'); $params['cost_cover_max'] = $request->input('cost_cover_max'); list($data, $header) = ShortPlayDataTrendService::adqSummaryOfShortDramaDataTrends($params); return self::returnValue([ 'data' => $data, 'header' => $header ]); } public function adqShortPlayDataTrendCurve(Request $request) { $validator = \Validator::make($request->all(),[ 'start_date' => 'required|date', 'end_date' => 'required|date', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $params['playlet_id'] = $request->input('playlet_id'); $params['sys_group_id'] = $request->input('sys_group_id'); $params['start_date'] = $request->input('start_date'); $params['end_date'] = $request->input('end_date'); $params['closing_date'] = $request->input('closing_date'); $params['plat_order_type'] = $request->input('plat_order_type'); // 0:小程序 1:h5 $params['cost_cover_min'] = $request->input('cost_cover_min'); $params['cost_cover_max'] = $request->input('cost_cover_max'); $data = ShortPlayDataTrendService::adqShortPlayDataTrendCurve($params); return self::returnValue(['data' => $data]); } public function mpShortPlayDataTrendList(Request $request) { $validator = \Validator::make($request->all(),[ 'start_date' => 'required|date', 'end_date' => 'required|date', 'closing_date' => 'nullable|date', 'page' => 'required|numeric', 'page_size' => 'required|numeric', 'playlet_id' => 'nullable|numeric', 'plat_order_type' => 'nullable|in:0,1' ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $params['start_date'] = $request->input('start_date'); $params['end_date'] = $request->input('end_date'); $params['sys_group_id'] = $request->input('sys_group_id'); $params['playlet_id'] = $request->input('playlet_id', null); $params['closing_date'] = $request->input('closing_date', null); $params['plat_order_type'] = $request->input('plat_order_type', null); $params['cost_cover_min'] = $request->input('cost_cover_min', null); $params['cost_cover_max'] = $request->input('cost_cover_max', null); $page = $request->input('page', 1); $pageSize = $request->input('page_size', 20); $sortField = $request->input('sort_field', 'ref_date'); $sortType = $request->input('sort_type', 'desc'); list($count, $list, $retrieveColumns) = ShortPlayDataTrendService::mpShortPlayDataTrendList($params, $page, $pageSize, $sortField, $sortType); return self::returnPageValue($list, $count, $pageSize, $page, $retrieveColumns); } public function mpSummaryOfShortDramaDataTrends(Request $request) { $validator = \Validator::make($request->all(),[ 'start_date' => 'required|date', 'end_date' => 'required|date', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $params['playlet_id'] = $request->input('playlet_id'); $params['sys_group_id'] = $request->input('sys_group_id'); $params['start_date'] = $request->input('start_date'); $params['end_date'] = $request->input('end_date'); $params['closing_date'] = $request->input('closing_date'); $params['plat_order_type'] = $request->input('plat_order_type'); // 0:小程序 1:h5 $params['cost_cover_min'] = $request->input('cost_cover_min'); $params['cost_cover_max'] = $request->input('cost_cover_max'); list($data, $header) = ShortPlayDataTrendService::mpSummaryOfShortDramaDataTrends($params); return self::returnValue([ 'data' => $data, 'header' => $header ]); } public function mpShortPlayDataTrendCurve(Request $request) { $validator = \Validator::make($request->all(),[ 'start_date' => 'required|date', 'end_date' => 'required|date', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $params['playlet_id'] = $request->input('playlet_id'); $params['sys_group_id'] = $request->input('sys_group_id'); $params['start_date'] = $request->input('start_date'); $params['end_date'] = $request->input('end_date'); $params['closing_date'] = $request->input('closing_date'); $params['plat_order_type'] = $request->input('plat_order_type'); // 0:小程序 1:h5 $params['cost_cover_min'] = $request->input('cost_cover_min'); $params['cost_cover_max'] = $request->input('cost_cover_max'); $data = ShortPlayDataTrendService::mpShortPlayDataTrendCurve($params); return self::returnValue(['data' => $data]); } public function shortPlayDataTrendList(Request $request) { $validator = \Validator::make($request->all(),[ 'start_date' => 'required|date', 'end_date' => 'required|date', 'closing_date' => 'nullable|date', 'page' => 'required|numeric', 'page_size' => 'required|numeric', 'playlet_id' => 'nullable|numeric', 'plat_order_type' => 'nullable|in:0,1' ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $params['start_date'] = $request->input('start_date'); $params['end_date'] = $request->input('end_date'); $params['sys_group_id'] = $request->input('sys_group_id'); $params['playlet_id'] = $request->input('playlet_id', null); $params['closing_date'] = $request->input('closing_date', null); $params['plat_order_type'] = $request->input('plat_order_type', null); $params['cost_cover_min'] = $request->input('cost_cover_min', null); $params['cost_cover_max'] = $request->input('cost_cover_max', null); $page = $request->input('page', 1); $pageSize = $request->input('page_size', 20); $sortField = $request->input('sort_field', 'ref_date'); $sortType = $request->input('sort_type', 'desc'); list($count, $list, $retrieveColumns) = ShortPlayDataTrendService::shortPlayDataTrendList($params, $page, $pageSize, $sortField, $sortType); return self::returnPageValue($list, $count, $pageSize, $page, $retrieveColumns); } public function summaryOfShortDramaDataTrends(Request $request) { $validator = \Validator::make($request->all(),[ 'start_date' => 'required|date', 'end_date' => 'required|date', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $params['playlet_id'] = $request->input('playlet_id'); $params['start_date'] = $request->input('start_date'); $params['end_date'] = $request->input('end_date'); $params['closing_date'] = $request->input('closing_date'); $params['sys_group_id'] = $request->input('sys_group_id'); $params['plat_order_type'] = $request->input('plat_order_type'); // 0:小程序 1:h5 $params['cost_cover_min'] = $request->input('cost_cover_min'); $params['cost_cover_max'] = $request->input('cost_cover_max'); list($data, $header) = ShortPlayDataTrendService::summaryOfShortDramaDataTrends($params); return self::returnValue([ 'data' => $data, 'header' => $header ]); } public function shortPlayDataTrendCurve(Request $request) { $validator = \Validator::make($request->all(),[ 'start_date' => 'required|date', 'end_date' => 'required|date', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $params['playlet_id'] = $request->input('playlet_id'); $params['sys_group_id'] = $request->input('sys_group_id'); $params['start_date'] = $request->input('start_date'); $params['end_date'] = $request->input('end_date'); $params['closing_date'] = $request->input('closing_date'); $params['plat_order_type'] = $request->input('plat_order_type'); // 0:小程序 1:h5 $params['cost_cover_min'] = $request->input('cost_cover_min'); $params['cost_cover_max'] = $request->input('cost_cover_max'); $data = ShortPlayDataTrendService::shortPlayDataTrendCurve($params); return self::returnValue(['data' => $data]); } public function shortPlayDataTrendListByAccount(Request $request) { $validator = \Validator::make($request->all(),[ 'start_date' => 'required|date', 'end_date' => 'required|date', 'closing_date' => 'nullable|date', 'page' => 'required|numeric', 'page_size' => 'required|numeric', 'playlet_id' => 'nullable|numeric', 'plat_order_type' => 'nullable|in:0,1', 'ad_type' => 'required|in:0,1,2' ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $params['start_date'] = $request->input('start_date'); $params['end_date'] = $request->input('end_date'); $params['playlet_id'] = $request->input('playlet_id', null); $params['closing_date'] = $request->input('closing_date', null); $params['plat_order_type'] = $request->input('plat_order_type', null); $params['cost_cover_min'] = $request->input('cost_cover_min', null); $params['cost_cover_max'] = $request->input('cost_cover_max', null); $params['admin_id'] = $request->input('admin_id'); $params['is_system_admin'] = $request->input('is_system_admin'); $params['sys_group_id'] = $request->input('sys_group_id'); $params['ad_type'] = $request->input('ad_type'); $page = $request->input('page', 1); $pageSize = $request->input('page_size', 20); $sortField = $request->input('sort_field', 'ref_date'); $sortType = $request->input('sort_type', 'desc'); list($count, $list, $retrieveColumns) = ShortPlayDataTrendService::shortPlayDataTrendListByAccount($params , $page, $pageSize, $sortField, $sortType); return self::returnPageValue($list, $count, $pageSize, $page, $retrieveColumns); } public function summaryOfShortDramaDataTrendsByAccount(Request $request) { $validator = \Validator::make($request->all(),[ 'start_date' => 'required|date', 'end_date' => 'required|date', 'closing_date' => 'nullable|date', 'playlet_id' => 'nullable|numeric', 'plat_order_type' => 'nullable|in:0,1', 'ad_type' => 'required|in:0,1,2' ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $params['playlet_id'] = $request->input('playlet_id'); $params['start_date'] = $request->input('start_date'); $params['end_date'] = $request->input('end_date'); $params['closing_date'] = $request->input('closing_date'); $params['plat_order_type'] = $request->input('plat_order_type'); // 0:小程序 1:h5 $params['cost_cover_min'] = $request->input('cost_cover_min'); $params['cost_cover_max'] = $request->input('cost_cover_max'); $params['admin_id'] = $request->input('admin_id'); $params['is_system_admin'] = $request->input('is_system_admin'); $params['sys_group_id'] = $request->input('sys_group_id'); $params['ad_type'] = $request->input('ad_type'); list($data, $header) = ShortPlayDataTrendService::summaryOfShortDramaDataTrendsByAccount($params); return self::returnValue([ 'data' => $data, 'header' => $header ]); } public function shortPlayDataTrendCurveByAccount(Request $request) { $validator = \Validator::make($request->all(),[ 'start_date' => 'required|date', 'end_date' => 'required|date', 'closing_date' => 'nullable|date', 'playlet_id' => 'nullable|numeric', 'plat_order_type' => 'nullable|in:0,1', 'ad_type' => 'required|in:0,1,2' ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $params['playlet_id'] = $request->input('playlet_id'); $params['start_date'] = $request->input('start_date'); $params['end_date'] = $request->input('end_date'); $params['closing_date'] = $request->input('closing_date'); $params['plat_order_type'] = $request->input('plat_order_type'); // 0:小程序 1:h5 $params['cost_cover_min'] = $request->input('cost_cover_min'); $params['cost_cover_max'] = $request->input('cost_cover_max'); $params['admin_id'] = $request->input('admin_id'); $params['is_system_admin'] = $request->input('is_system_admin'); $params['sys_group_id'] = $request->input('sys_group_id'); $params['ad_type'] = $request->input('ad_type'); $data = ShortPlayDataTrendService::shortPlayDataTrendCurveByAccount($params); return self::returnValue(['data' => $data]); } }