all(),[ 'start_date' => 'required|date', 'end_date' => 'required|date', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $params['start_date'] = $request->input('start_date'); $params['end_date'] = $request->input('end_date'); $params['operator_id'] = $request->input('operator_id'); $params['app_id'] = $request->input('app_id'); $params['closing_date'] = $request->input('closing_date'); $params['sys_group_id'] = $request->input('sys_group_id'); $params['is_system_admin'] = $request->input('is_system_admin'); $params['admin_id'] = $request->input('admin_id'); $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) = OperateDataService::getAccountData( $params, $sortField, $sortType, $page, $pageSize ); return self::returnPageValue($list, $count, $pageSize, $page, $retrieveColumns); } /** * 运营公众号数据汇总 * */ public function accountDataSummary(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['start_date'] = $request->input('start_date'); $params['end_date'] = $request->input('end_date'); $params['operator_id'] = $request->input('operator_id'); $params['app_id'] = $request->input('app_id'); $params['closing_date'] = $request->input('closing_date'); $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'); list($data, $header) = OperateDataService::getAccountDataSummary($params); return self::returnValue([ 'data' => $data, 'header' => $header ]); } /** * 运营数据 * */ public function data(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['start_date'] = $request->input('start_date'); $params['end_date'] = $request->input('end_date'); $params['operator_id'] = $request->input('operator_id'); $params['closing_date'] = $request->input('closing_date'); $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'); $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) = OperateDataService::getOperateData( $params, $sortField, $sortType, $page, $pageSize ); return self::returnPageValue($list, $count, $pageSize, $page, $retrieveColumns); } /** * 运营数据汇总 * */ public function dataSummary(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['start_date'] = $request->input('start_date'); $params['end_date'] = $request->input('end_date'); $params['operator_id'] = $request->input('operator_id'); $params['closing_date'] = $request->input('closing_date'); $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'); list($data, $header) = OperateDataService::getOperateDataSummary($params); return self::returnValue([ 'data' => $data, 'header' => $header ]); } }