all(),[ 'rule_id' => 'required|int', 'type' => ['required', Rule::in([1, 2, 3, 4])], ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $sysGroupId = $request->input('sys_group_id'); $adminId = $request->input('admin_id'); $type = $request->input('type'); $ruleId = $request->input('rule_id'); # 创建任务 $errno = MassMsgCancelService::setConfig($ruleId, $type, $sysGroupId, $adminId); return self::returnValue([], $errno); } /** * 群发停止任务列表 * */ public function taskList(Request $request) { $validator = \Validator::make($request->all(),[ 'type' => ['required', Rule::in([1, 2, 3, 4])], ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $sysGroupId = $request->input('sys_group_id'); $type = $request->input('type'); $page = $request->input('page', 1); $pageSize = $request->input('page_size', 20); # 获取群发停止任务列表 list($list, $count) = MassMsgCancelService::taskList($sysGroupId, $type, $page, $pageSize); return self::returnPageValue($list, $count, $pageSize, $page); } }