all(),[ 'corpid' => 'required|string', 'name' => 'required|string', 'send_type' => ['required', Rule::in([1, 2])], 'send_mode' => ['required', Rule::in([1, 2])], 'send_time' => 'required|date_format:Y-m-d H:i:s', 'content' => ['required_without:attachments', 'nullable'], 'attachments' => ['required_without:content', 'nullable'], ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $params = array(); $ruleId = $request->input('rule_id'); $params['corpid'] = $request->input('corpid'); $params['admin_id'] = $request->input('admin_id'); $params['name'] = $request->input('name'); $params['send_type'] = $request->input('send_type'); // 发送类型 1:立即发送 2:定时发送 $params['send_time'] = $request->input('send_time'); // 发送时间 $params['senders'] = $request->input('senders'); // 群主集合 $params['content'] = $request->input('content'); // 内容 $params['attachments'] = $request->input('attachments'); // 附件 $params['send_mode'] = $request->input('send_mode'); // 发送方式 1按群主 2按群聊 $params['chat_groups'] = $request->input('chat_groups'); // 群聊集合 $params['item_id'] = $request->input('item_id'); // 商品ID $params['operate_type'] = $request->input('operate_type', 1);# 运营类型 1单主体 2多主体 # 设置群发规则 $errNo = ChatGroupRuleService::setChatGroupMassMsg($ruleId, $params); return self::returnValue([], $errNo); } /** * 客户群列表 * */ public function groupList(Request $request) { $validator = \Validator::make($request->all(),[ 'corpid' => 'required|string', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $corpid = $request->input('corpid'); $owner = $request->input('owner'); $keyword = $request->input('keyword'); $page = $request->input('page', 1); $pageSize = $request->input('page_size', 20); if($pageSize == 500) $pageSize = 20000; // 用于数据导出 # 获取群列表 list($list, $count) = ChatGroupRuleService::groupList($corpid, $owner, $keyword, $page, $pageSize); return self::returnPageValue($list, $count, $pageSize, $page); } /** * 查询所有群聊的去重客户数 * */ public function uniqueMemberCount(Request $request) { $validator = \Validator::make($request->all(), [ 'corpid' => 'required|string', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $corpid = $request->input('corpid'); $count = ChatGroupRuleService::getUniqueMemberCount($corpid); return self::returnValue(['member_count' => $count]); } /** * 客户群概况 * */ public function condition(Request $request) { $validator = \Validator::make($request->all(), [ 'corpid' => 'required|string', 'chat_id' => 'required|string', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $corpid = $request->input('corpid'); $chatId = $request->input('chat_id'); # 获取群概况 $condition = ChatGroupRuleService::groupCondition($corpid, $chatId); return self::returnValue($condition); } /** * 客户群成员列表 * */ public function memberList(Request $request) { $validator = \Validator::make($request->all(), [ 'corpid' => 'required|string', 'chat_id' => 'required|string', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $corpid = $request->input('corpid'); $chatId = $request->input('chat_id'); $page = $request->input('page', 1); $pageSize = $request->input('page_size', 20); $status = $request->input('status'); $keyword = $request->input('keyword'); $joinTimeStart = $request->input('join_time_start'); $joinTimeEnd = $request->input('join_time_end'); # 获取客户群成员列表 list($list, $count) = ChatGroupRuleService::getMemberList($corpid, $chatId, $status, $keyword, $joinTimeStart , $joinTimeEnd, $page, $pageSize); return self::returnPageValue($list, $count, $pageSize, $page); } // 群发消息列表 public function ruleLists(Request $request) { $validator = \Validator::make($request->all(),[ 'corpid' => 'required|string', 'send_time_start' => 'nullable|date_format:Y-m-d H:i:s', 'send_time_end' => 'nullable|date_format:Y-m-d H:i:s', 'create_time_start' => 'nullable|date_format:Y-m-d H:i:s', 'create_time_end' => 'nullable|date_format:Y-m-d H:i:s', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $corpid = $request->input('corpid'); $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); $ruleName = $request->input('rule_name'); $createTimeStart = $request->input('create_time_start'); $createTimeEnd = $request->input('create_time_end'); $sortColumn = $request->input('sort_column','send_time'); $sortMethod = $request->input('sort_method','desc'); # 获取群发规则列表 $errno = 0; list($list, $count) = ChatGroupMassMsgRuleService::ruleList( $corpid, $creatorId, $sendTimeStart, $sendTimeEnd, $createTimeStart,$createTimeEnd,$sortColumn,$sortMethod, $page, $pageSize, $errno, $ruleName ); if($errno) return self::returnValue([], $errno); return self::returnPageValue($list, $count, $pageSize, $page); } /** * 客户群群发详情 * */ public function ruleDetail(Request $request) { $validator = \Validator::make($request->all(),[ 'corpid' => 'required|string', 'rule_id' => 'required|integer', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $corpid = $request->input('corpid'); $ruleId = $request->input('rule_id'); # 获取群发消息详情 $errno = 0; $detail = ChatGroupMassMsgRuleService::ruleDetailNew($corpid, $ruleId, $errno); return self::returnValue($detail, $errno); } // 群发规则禁用启用 public function updateStatus(Request $request) { $validator = \Validator::make($request->all(),[ 'corpid' => 'required|string', 'rule_id' => 'required|integer', 'status' => ['required', Rule::in([0, 1])], ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $corpid = $request->input('corpid'); $status = $request->input('status'); $ruleId = $request->input('rule_id'); $errno = ChatGroupMassMsgRuleService::updateRuleStatus($corpid, $ruleId, $status); return self::returnValue([], $errno); } // 给群发消息未发送成员发送消息提醒 public function noticeUser(Request $request) { $validator = \Validator::make($request->all(),[ 'corpid' => 'required|string', 'rule_id' => 'required|integer', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $corpid = $request->input('corpid'); $ruleId = $request->input('rule_id'); $errno = ChatGroupMassMsgRuleService::noticeUser($corpid, $ruleId); return self::returnValue([], $errno); } /** * 客户群群发详情 * */ public function chatGroupReceiveDetail(Request $request) { $validator = \Validator::make($request->all(),[ 'rule_id' => 'required|integer', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $ruleId = $request->input('rule_id'); $chatGroupName = $request->input('chat_group_name'); $senderList = $request->input('sender_list'); $status = $request->input('status'); $page = $request->input('page', 1); $pageSize = $request->input('page_size', 20); if($pageSize==500) $pageSize = 10000; $errno = 0; list($list, $count) = ChatGroupMassMsgRuleService::chatGroupReceiveDetailNew( $ruleId, $chatGroupName, $senderList, $status, $errno, $page, $pageSize ); if($errno){ return self::returnValue([], $errno); } return self::returnPageValue($list, $count, $pageSize, $page); } public function chatGroupOwnerList(Request $request) { $validator = \Validator::make($request->all(),[ 'corpid' => 'required', 'user_name' => 'nullable|string' ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $corpid = $request->input('corpid'); $userName = $request->input('user_name'); $data = ChatGroupService::ownerList($corpid, $userName); return self::returnValue($data); } /** * 获取账号下各企微的群主列表 * */ public function ownerListOfCompany(Request $request) { $validator = \Validator::make($request->all(),[ 'user_name' => 'nullable|string' ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $userName = $request->input('user_name'); $sysGroupId = $request->input('sys_group_id'); $data = ChatGroupService::ownerListOfCompany($userName, $sysGroupId); return self::returnValue($data); } /** * 检索框群列表 * @param Request $request * @return array */ public function chatGroupList(Request $request) { $validator = \Validator::make($request->all(),[ 'corpid' => 'required', 'start_time' => 'nullable|date_format:Y-m-d H:i:s', 'end_time' => 'nullable|date_format:Y-m-d H:i:s', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $corpid = $request->input('corpid'); $keyword = $request->input('keyword'); $startTime = $request->input('start_time'); $endTime = $request->input('end_time'); $owner = $request->input('owner'); $isActive = $request->input('is_active', 0); $data = ChatGroupService::chatGroupList($corpid, $keyword, $startTime, $endTime, $owner, $isActive); return self::returnValue($data); } /** * 简单群主列表 * @param Request $request * @return array */ public function chatGroupOwnerIndex(Request $request) { $validator = \Validator::make($request->all(),[ 'corpid' => 'required', 'user_name' => 'nullable|string' ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $corpid = $request->input('corpid'); $userName = $request->input('user_name'); $data = ChatGroupService::ownerIndex($corpid, $userName); return self::returnValue($data); } /** * 配置邀请入群规则 * */ public function setInviteRule(Request $request) { $validator = \Validator::make($request->all(),[ 'corpid' => 'required|string', 'title' => 'required|string', 'invite_config' => 'required|string', 'is_for_all' => ['required', Rule::in([0, 1])], ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $params = array(); $ruleId = $request->input('rule_id'); $params['admin_id'] = $request->input('admin_id', 1); $params['sys_group_id'] = $request->input('sys_group_id'); $params['corpid'] = $request->input('corpid'); $params['is_for_all'] = $request->input('is_for_all');// 是否通用于全部员工 0:否 1:是 $params['users'] = $request->input('users');// 使用成员,当通用于全部员工是,该字段可为空 $params['title'] = $request->input('title'); $params['join_type'] = $request->input('join_type', 1);// 进群方式 1顺序进群 2随机进群 $params['invite_config'] = $request->input('invite_config');// 渠道群管理 $params['customer_filter'] = $request->input('customer_filter');// 客户筛选 0:全部客户 1:筛选客户 $params['filter_type'] = $request->input('filter_type', 1);// 筛选用户方式 1客户添加N小时后拉群 2按指定添加起止时间筛选 $params['add_time_st'] = $request->input('add_time_st');// 客户添加时间筛选的起始时间 $params['add_time_et'] = $request->input('add_time_et');// 客户添加时间筛选的截止时间 $params['add_time_later'] = $request->input('add_time_later');// 添加客服多久后拉群,单位:小时 $params['invite_type'] = $request->input('invite_type');// 邀请类型。1直接邀请 2定时邀请 $params['invite_time'] = $request->input('invite_time');// 邀请入群时间点 $params['owner_type'] = $request->input('owner_type');// 群主类型 1.本群主群聊 2.指定其他群主群聊 $params['announcement'] = $request->input('announcement');// 群公告 $params['pay_status'] = $request->input('pay_status');// 是否付费 $params['pay_num_min'] = $request->input('pay_num_min');// 最小付费次数 $params['pay_num_max'] = $request->input('pay_num_max');// 最大付费次数 // 标签筛选方式 0未设置标签筛选 1所选标签满足其一 2所选标签全部满足 3无任何标签 $params['tag_screen_type'] = $request->input('tag_screen_type', 0); $params['tag_list'] = $request->input('tag_list'); $params['gender'] = $request->input('gender');// 客户性别 0未知 1男性 2女性 $params['upper_limit'] = $request->input('upper_limit');// 建群数量上限 $params['continuously_attract_groups'] = $request->input('continuously_attract_groups', 0);// 是否为持续拉取客户入群任务 1是 0否 $params['supplementary_invite_time'] = $request->input('supplementary_invite_time');// 补充邀请入群时间点 $params['supplementary_invite'] = $request->input('supplementary_invite', 0); // 补充邀请入群开启状态 1开启 0关闭 $params['supplementary_invite_cycle'] = $request->input('supplementary_invite_cycle', 1);// 补充邀请入群时间间隔(单位天) # 设置新用户邀请入群规则 $errNo = ChatGroupService::setInviteRule($ruleId, $params); Log::logInfo('配置邀请入群规则', [ 'rule_id' => $ruleId, 'params' => $params, 'errno' => $errNo ], 'setInviteRule'); return self::returnValue([], $errNo); } /** * 邀请入群规则列表 * */ public function inviteRuleList(Request $request) { $validator = \Validator::make($request->all(),[ 'corpid' => 'required|string', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $sysGroupId = $request->input('sys_group_id'); $corpid = $request->input('corpid'); $userId = $request->input('user_id'); $status = $request->input('status'); $keyword = $request->input('keyword'); $page = $request->input('page', 1); $pageSize = $request->input('page_size', 20); # 获取列表 list($list, $count) = ChatGroupService::getInviteRuleList($corpid, $userId, $sysGroupId, $keyword, $status, $page, $pageSize); return self::returnPageValue($list, $count, $pageSize, $page); } /** * 邀请入群规则详情 * */ public function inviteRuleDetail(Request $request) { $validator = \Validator::make($request->all(),[ 'rule_id' => 'required|integer', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $sysGroupId = $request->input('sys_group_id'); $ruleId = $request->input('rule_id'); # 获取规则详情 $detail = ChatGroupService::inviteRuleDetail($ruleId, $sysGroupId); return self::returnValue($detail); } /** * 删除邀请入群规则 * */ public function inviteRuleDel(Request $request) { $validator = \Validator::make($request->all(),[ 'rule_id' => 'required|integer', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $adminId = $request->input('admin_id'); $sysGroupId = $request->input('sys_group_id'); $ruleId = $request->input('rule_id'); # 删除规则 $errno = ChatGroupService::inviteRuleDel($ruleId, $sysGroupId, $adminId); return self::returnValue([], $errno); } /** * 修改邀请入群规则状态 * */ public function inviteRuleStatusChange(Request $request) { $validator = \Validator::make($request->all(),[ 'corpid' => 'required|string', 'rule_id' => 'required|integer', 'status' => ['required', Rule::in([0, 1])], ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $adminId = $request->input('admin_id'); $sysGroupId = $request->input('sys_group_id'); $status = $request->input('status'); $ruleId = $request->input('rule_id'); $errno = ChatGroupService::updateRuleStatus($ruleId, $adminId, $status, $sysGroupId); return self::returnValue([], $errno); } public function resetSupplementaryInviteTime(Request $request) { $validator = \Validator::make($request->all(),[ 'corpid' => 'required|string', 'rule_id' => 'required|integer', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $adminId = $request->input('admin_id'); $sysGroupId = $request->input('sys_group_id'); $ruleId = $request->input('rule_id'); $errno = ChatGroupService::resetSupplementaryInviteTime($ruleId, $adminId, $sysGroupId); return self::returnValue([], $errno); } /** * 客户群数据--按客户群统计 * */ public function chatGroupStatistic(Request $request) { $sysGroupId = $request->input('sys_group_id'); $keyword = $request->input('keyword'); $corpid = $request->input('corpid'); $owner = $request->input('owner'); $minMember = $request->input('min_member'); $maxMember = $request->input('max_member'); $ownerList = $request->input('owner_list'); $createTimeSt = $request->input('create_time_st'); $createTimeEt = $request->input('create_time_et'); $page = $request->input('page', 1); $pageSize = $request->input('page_size', 20); # 数据统计 list($list, $count) = ChatGroupService::chatGroupStatistic( $sysGroupId, $owner, $ownerList, $keyword, $corpid, $createTimeSt, $createTimeEt, $minMember, $maxMember, $page, $pageSize ); return self::returnPageValue($list, $count, $pageSize, $page); } /** * 客户群数据概览--按客户群统计 * */ public function chatGroupCondition(Request $request) { $sysGroupId = $request->input('sys_group_id'); $owner = $request->input('owner'); $ownerList = $request->input('owner_list'); $corpid = $request->input('corpid'); $createTimeSt = $request->input('create_time_st'); $createTimeEt = $request->input('create_time_et'); $minMember = $request->input('min_member'); $maxMember = $request->input('max_member'); # 数据汇总 $data = ChatGroupService::chatGroupCondition( $sysGroupId, $owner, $ownerList, $corpid, $createTimeSt, $createTimeEt, $minMember, $maxMember ); return self::returnValue($data); } public static function syncCorpChatGroup(Request $request) { $validator = \Validator::make($request->all(),[ 'corpid' => 'required', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $corpid = $request->input('corpid'); list($res, $code) = ChatGroupService::syncCorpChatGroup($corpid); return self::returnValue($res, $code); } # 接收客户端上传的待创建群聊信息 public function receiveCreateChatGroupData(Request $request) { $validator = \Validator::make($request->all(), [ 'device_id' => 'required|string', 'corpid' => 'required|string', 'user_name' => 'required|string', 'group_list' => 'required' ]); if ($validator->fails()) { return self::returnValue(['error' => $validator->errors()], 1102); } $deviceId = $request->input('device_id'); $corpid = $request->input('corpid'); $userName = $request->input('user_name'); $groupList = $request->input('group_list'); list($response, $errcode) = ChatGroupService::receiveCreateChatGroupData($deviceId, $corpid, $userName, $groupList); Log::logInfo('接收待创建群聊任务', [ 'device_id' => $deviceId, 'corpid' => $corpid, 'user_name' => $userName, 'group_list' => $groupList, 'response' => $response ], 'receiveCreateChatGroupData'); return self::returnValue($response, $errcode); } public function getCreateGroupTask(Request $request) { $validator = \Validator::make($request->all(), [ 'device_id' => 'required|string', ]); if ($validator->fails()) { return self::returnValue(['error' => $validator->errors()], 1102); } $deviceId = $request->input('device_id'); $taskList = ChatGroupService::getCreateGroupTask($deviceId); Log::logInfo('创建群聊任务返回', [ 'device_id' => $deviceId, 'response' => $taskList ], 'getCreateGroupTask'); return self::returnValue($taskList); } # 添加客户群欢迎语素材 public function setWelcomeTemplate(Request $request) { $validator = \Validator::make($request->all(), [ 'corpid' => 'required|string', 'name' => 'required|string', 'content' => ['required_without:attachments', 'nullable'], 'attachments' => ['required_without:content', 'nullable'], ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $params = array(); $params['corpid'] = $request->input('corpid'); $params['admin_id'] = $request->input('admin_id'); $params['sys_group_id'] = $request->input('sys_group_id'); $params['template_id'] = $request->input('template_id'); $params['name'] = $request->input('name'); $params['content'] = $request->input('content'); $params['attachments'] = $request->input('attachments'); $error = 0; ChatGroupService::setWelcomeTemplate($params, $error); return self::returnValue('', $error); } # 客户群欢迎语素材列表 public function welcomeTemplateList(Request $request) { $validator = \Validator::make($request->all(), [ 'corpid' => 'required|string', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $corpid = $request->input('corpid'); $sysGroupId = $request->input('sys_group_id'); $keyword = $request->input('keyword'); $creatorId = $request->input('creator_id'); $page = $request->input('page'); $pageSize = $request->input('page_size'); list($list, $count) = ChatGroupService::welcomeTemplateList($corpid, $sysGroupId, $keyword, $creatorId, $page, $pageSize); return self::returnPageValue($list, $count, $pageSize, $page); } # 客户群欢迎语素材详情 public function welcomeTemplateDetail(Request $request) { $validator = \Validator::make($request->all(), [ 'corpid' => 'required|string', 'template_id' => 'required', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $corpid = $request->input('corpid'); $sysGroupId = $request->input('sys_group_id'); $templateId = $request->input('template_id'); $data = ChatGroupService::welcomeTemplateDetail($sysGroupId, $corpid, $templateId); return self::returnValue($data); } # 删除客户群欢迎语素材 public function delWelcomeTemplate(Request $request) { $validator = \Validator::make($request->all(), [ 'corpid' => 'required|string', 'template_id' => 'required', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $corpid = $request->input('corpid'); $sysGroupId = $request->input('sys_group_id'); $templateId = $request->input('template_id'); $errcode = 0; ChatGroupService::delWelcomeTemplate($sysGroupId, $corpid, $templateId, $errcode); return self::returnValue('', $errcode); } # 转发客服列表 public function forwardMemberList(Request $request) { $sysGroupId = $request->input('sys_group_id'); $keyword = $request->input('keyword'); $list = AndroidToolService::getForwardMemberList($sysGroupId, $keyword); return self::returnValue($list); } # 配置创建转发群聊规则 public function setForwardChatGroupCreateRule(Request $request) { $validator = \Validator::make($request->all(),[ 'title' => 'required|string', 'template_group_name' => 'required|string', 'group_num' => 'required', 'create_type' => 'required' ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $params = array(); $ruleId = $request->input('rule_id'); $params['admin_id'] = $request->input('admin_id', 1); $params['sys_group_id'] = $request->input('sys_group_id'); $params['corpid'] = $request->input('corpid'); $params['is_for_all'] = $request->input('is_for_all'); $params['users'] = $request->input('users');// 使用成员,当通用于全部员工是,该字段可为空 $params['title'] = $request->input('title');// 规则名称 $params['create_type'] = $request->input('create_type');// 邀请类型。1直接邀请 2定时邀请 $params['do_time'] = $request->input('do_time');// 邀请入群时间点 $params['template_group_name'] = $request->input('template_group_name');// 模板群聊名称 $params['group_num'] = $request->input('group_num', 1);// 创建群聊数 $params['forward_users'] = $request->input('forward_users');// 转发客服(系统自增ID列表) # 设置新用户邀请入群规则 $errNo = ChatGroupService::setForwardChatGroupCreateRule($ruleId, $params); Log::logInfo('配置转发消息客服入群规则', [ 'rule_id' => $ruleId, 'params' => $params, 'errno' => $errNo ], 'setForwardChatGroupCreateRule'); return self::returnValue([], $errNo); } # 转发群聊创建规则列表 public function forwardChatGroupCreateRuleList(Request $request) { $validator = \Validator::make($request->all(),[ 'corpid' => 'required|string', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $sysGroupId = $request->input('sys_group_id'); $corpid = $request->input('corpid'); $userId = $request->input('user_id'); $status = $request->input('status'); $keyword = $request->input('keyword'); $page = $request->input('page', 1); $pageSize = $request->input('page_size', 20); # 获取列表 list($list, $count) = ChatGroupService::forwardChatGroupCreateRuleList($corpid, $userId, $sysGroupId, $keyword, $status, $page, $pageSize); return self::returnPageValue($list, $count, $pageSize, $page); } # 转发群聊创建规则详情 public function forwardChatGroupCreateRuleDetail(Request $request) { $validator = \Validator::make($request->all(),[ 'rule_id' => 'required|integer', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $sysGroupId = $request->input('sys_group_id'); $ruleId = $request->input('rule_id'); # 获取规则详情 $detail = ChatGroupService::forwardChatGroupCreateRuleDetail($ruleId); return self::returnValue($detail); } # 转发群聊创建规则状态调整 public function forwardChatGroupCreateRuleChangeStatus(Request $request) { $validator = \Validator::make($request->all(),[ 'corpid' => 'required|string', 'rule_id' => 'required|integer', 'status' => ['required', Rule::in([0, 1])], ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $adminId = $request->input('admin_id'); $sysGroupId = $request->input('sys_group_id'); $status = $request->input('status'); $ruleId = $request->input('rule_id'); $errno = ChatGroupService::forwardChatGroupCreateRuleChangeStatus($ruleId, $adminId, $status, $sysGroupId); return self::returnValue([], $errno); } # 转发群里哦啊创建规则删除 public function forwardChatGroupCreateRuleDelete(Request $request) { $validator = \Validator::make($request->all(),[ 'rule_id' => 'required|integer', ]); if ($validator->fails()) { return self::returnValue($validator->getMessageBag(), 1102); } $adminId = $request->input('admin_id'); $sysGroupId = $request->input('sys_group_id'); $ruleId = $request->input('rule_id'); # 删除规则 $errno = ChatGroupService::forwardChatGroupCreateRuleDelete($ruleId, $sysGroupId, $adminId); return self::returnValue([], $errno); } }