all(),[ 'send_time_start' => 'nullable|date_format:Y-m-d', 'send_time_end' => 'nullable|date_format:Y-m-d', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $creatorId = $request->input('creator_id'); $sendTimeStart = $request->input('send_time_start'); $sendTimeEnd = $request->input('send_time_end'); $page = $request->input('page', 1); $pageSize = $request->input('page_size', 20); $sortColumn = $request->input('sort_column','send_time'); $group_admin_id = $request->input("group_admin_id",0); $is_system_admin = $request->input("is_system_admin",0); $sys_group_id = $request->input('sys_group_id'); # 获取群发规则列表 $errno = 0; list($list, $count) = PopularizService::ruleList( $creatorId, $sendTimeStart, $sendTimeEnd, $sortColumn, $page, $pageSize, $is_system_admin, $group_admin_id, $errno, $sys_group_id ); if($errno) return self::returnValue([], $errno); return self::returnPageValue($list, $count, $pageSize, $page); } public function ruleTotal(Request $request) { $validator = \Validator::make($request->all(),[ 'send_time_start' => 'nullable|date_format:Y-m-d', 'send_time_end' => 'nullable|date_format:Y-m-d', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $creatorId = $request->input('creator_id'); $sendTimeStart = $request->input('send_time_start'); $sendTimeEnd = $request->input('send_time_end'); $group_admin_id = $request->input("group_admin_id",0); $is_system_admin = $request->input("is_system_admin",0); $sys_group_id = $request->input('sys_group_id'); # 获取群发规则列表 $result = PopularizService::getRuleTotal($creatorId, $sendTimeStart, $sendTimeEnd, $is_system_admin, $group_admin_id, $sys_group_id); return self::returnValue($result); } /** * 朋友圈任务列表 * */ public function taskList(Request $request) { $validator = \Validator::make($request->all(),[ 'send_time_start' => 'nullable|date_format:Y-m-d', 'send_time_end' => 'nullable|date_format:Y-m-d', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $creatorId = $request->input('creator_id'); $sendTimeStart = $request->input('send_time_start'); $sendTimeEnd = $request->input('send_time_end'); $page = $request->input('page', 1); $pageSize = $request->input('page_size', 20); $sortColumn = $request->input('sort_column','send_time'); $group_admin_id = $request->input("group_admin_id",0); $is_system_admin = $request->input("is_system_admin",0); $sys_group_id = $request->input('sys_group_id'); # 获取群发规则列表 $errno = 0; list($list, $count) = PopularizService::taskList( $creatorId, $sendTimeStart, $sendTimeEnd, $sortColumn, $page, $pageSize, $is_system_admin, $group_admin_id, $errno, $sys_group_id ); if($errno) return self::returnValue([], $errno); return self::returnPageValue($list, $count, $pageSize, $page); } public function momentTotal(Request $request) { $validator = \Validator::make($request->all(),[ 'send_time_start' => 'nullable|date_format:Y-m-d', 'send_time_end' => 'nullable|date_format:Y-m-d', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $creatorId = $request->input('creator_id'); $sendTimeStart = $request->input('send_time_start'); $sendTimeEnd = $request->input('send_time_end'); $group_admin_id = $request->input("group_admin_id",0); $is_system_admin = $request->input("is_system_admin",0); $sys_group_id = $request->input('sys_group_id'); # 获取群发规则列表 $result = PopularizService::getMomentTotal($creatorId, $sendTimeStart, $sendTimeEnd, $is_system_admin, $group_admin_id, $sys_group_id); return self::returnValue($result); } public function promotionData(Request $request) { $validator = \Validator::make($request->all(),[ 'send_time_start' => 'nullable|date_format:Y-m-d', 'send_time_end' => 'nullable|date_format:Y-m-d', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $sendTimeStart = $request->input('send_time_start'); $sendTimeEnd = $request->input('send_time_end'); $page = $request->input('page', 1); $pageSize = $request->input('page_size', 20); $keyword = $request->input('keyword'); $platType = $request->input('plat_type'); $groupAdminId = $request->input("group_admin_id",0); $isSystemAdmin = $request->input("is_system_admin",0); $sysGroupId = $request->input('sys_group_id'); # 获取群发规则列表 list($result, $count, $totalStat) = PopularizService::promotionData($platType, $sendTimeStart, $sendTimeEnd, $keyword, $page, $pageSize); return self::returnPageValue($result, $count, $pageSize, $page, $totalStat); } }