all(),[ 'start_date' => 'required|date', 'end_date' => 'required|date', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $params['account_id'] = $request->input('account_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'); $sortField = $request->input('sort_field', 'account_id'); $sortType = $request->input('sort_type', 'desc'); // 排序方式 $page = $request->input('page', 1); $pageSize = $request->input('page_size', 10); list($list, $count, $retrieveColumns) = AccountDataTrendService::getAdqAccountDataTrend( $params, $sortField, $sortType, $page, $pageSize ); return self::returnPageValue($list, $count, $pageSize, $page, $retrieveColumns); } /** * ADQ账号总概数据 * */ public function adqAccountSummary(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['account_id'] = $request->input('account_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) = AccountDataTrendService::getAdqAccountDataSummary($params); return self::returnValue([ 'data' => $data, 'header' => $header ]); } /** * Adq账号数据汇总曲线 * */ public function adqAccountCurve(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['account_id'] = $request->input('account_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'); $data = AccountDataTrendService::getAdqAccountDataCurve($params); return self::returnValue(['data' => $data]); } /** * MP账号数据趋势 * */ public function mpAccount(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['app_id'] = $request->input('app_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'); $sortField = $request->input('sort_field', 'account_id'); $sortType = $request->input('sort_type', 'desc'); // 排序方式 $page = $request->input('page', 1); $pageSize = $request->input('page_size', 10); list($list, $count, $retrieveColumns) = AccountDataTrendService::getMpAccountDataTrend( $params, $sortField, $sortType, $page, $pageSize ); return self::returnPageValue($list, $count, $pageSize, $page, $retrieveColumns); } /** * MP账号总概数据 * */ public function mpAccountSummary(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['app_id'] = $request->input('app_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) = AccountDataTrendService::getMpAccountDataSummary($params); return self::returnValue([ 'data' => $data, 'header' => $header ]); } /** * Adq账号数据汇总曲线 * */ public function mpAccountCurve(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['app_id'] = $request->input('app_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 = AccountDataTrendService::getMpAccountDataCurve($params); return self::returnValue(['data' => $data]); } /** * 账号数据趋势(ADQ+MP) * */ public function account(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['account_id'] = $request->input('account_id'); $params['sys_group_id'] = $request->input('sys_group_id'); $params['admin_id'] = $request->input('admin_id'); $params['is_system_admin'] = $request->input('is_system_admin'); $params['ad_type'] = $request->input('ad_type'); $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'); $sortField = $request->input('sort_field', '_key'); $sortType = $request->input('sort_type', 'desc'); // 排序方式 $page = $request->input('page', 1); $pageSize = $request->input('page_size', 10); list($list, $count, $retrieveColumns) = AccountDataTrendService::getAccountDataTrend( $params, $sortField, $sortType, $page, $pageSize ); return self::returnPageValue($list, $count, $pageSize, $page, $retrieveColumns); } /** * 账号总概数据(ADQ+MP) * */ public function accountSummary(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['account_id'] = $request->input('account_id'); $params['sys_group_id'] = $request->input('sys_group_id'); $params['admin_id'] = $request->input('admin_id'); $params['is_system_admin'] = $request->input('is_system_admin'); $params['ad_type'] = $request->input('ad_type'); $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) = AccountDataTrendService::getAccountDataSummary($params); return self::returnValue([ 'data' => $data, 'header' => $header ]); } /** * 账号数据汇总曲线(ADQ+MP) * */ public function accountCurve(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['account_id'] = $request->input('account_id'); $params['sys_group_id'] = $request->input('sys_group_id'); $params['admin_id'] = $request->input('admin_id'); $params['is_system_admin'] = $request->input('is_system_admin'); $params['ad_type'] = $request->input('ad_type'); $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 = AccountDataTrendService::getAccountDataCurve($params); return self::returnValue(['data' => $data]); } }