all(),[ 'group_name' => 'required|string', 'operator_id' => 'required|int', 'corp_user_list' => 'required', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $groupId = $request->input('group_id'); $groupName = $request->input('group_name'); $operatorId = $request->input('operator_id'); $corpUserList = $request->input('corp_user_list'); $sysGroupId = $request->input('sys_group_id'); $adminId = $request->input('admin_id'); # 配置运营组信息 $errno = OperationGroupService::setConfig($groupId, $groupName, $operatorId, $corpUserList, $sysGroupId, $adminId); return self::returnValue([], $errno); } /** * 运营组列表 * */ public function groupList(Request $request) { $sysGroupId = $request->input('sys_group_id'); $adminId = $request->input('admin_id'); $operatorId = $request->input('operator_id'); $page = $request->input('page', 1); $pageSize = $request->input('page_size', 20); # 获取运营组列表 list($list, $count) = OperationGroupService::groupList($sysGroupId, $adminId, $operatorId, $page, $pageSize); return self::returnPageValue($list, $count, $pageSize, $page); } /** * 运营组详情 * */ public function groupDetail(Request $request) { $validator = \Validator::make($request->all(),[ 'group_id' => 'required|int', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $sysGroupId = $request->input('sys_group_id'); $groupId = $request->input('group_id'); # 获取运营组详情数据 $errno = 0; $data = OperationGroupService::groupDetail($groupId, $sysGroupId, $errno); return self::returnValue($data, $errno); } /** * 运营组 开启/禁用 * */ public function groupStatusChange(Request $request) { $validator = \Validator::make($request->all(),[ 'group_id' => 'required|int', 'status' => ['required',Rule::in([0, 1])], ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $sysGroupId = $request->input('sys_group_id'); $groupId = $request->input('group_id'); $status = $request->input('status'); # 修改运营组状态 $errno = OperationGroupService::changeStatus($sysGroupId, $groupId, $status); return self::returnValue([], $errno); } }