12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- namespace app\controller\api\v1\work;
- use app\Request;
- use app\services\work\WorkGroupChatMemberServices;
- use app\services\work\WorkGroupChatServices;
- use crmeb\services\wechat\config\WorkConfig;
- class GroupChatController extends BaseWorkController
- {
-
- public function __construct(Request $request, WorkGroupChatServices $services)
- {
- $this->request = $request;
- $this->service = $services;
- }
-
- public function getGroupInfo(WorkConfig $config)
- {
- $chatId = $this->request->param('chat_id');
- if (!$chatId) {
- return $this->fail('缺少参数');
- }
- $corpId = $config->get('corpId');
- return $this->success($this->service->getGroupInfo($chatId, $corpId));
- }
-
- public function getChatMemberList(WorkGroupChatMemberServices $services, $id)
- {
- if (!$id) {
- return $this->fail('缺少参数');
- }
- $name = $this->request->get('name', '');
- return $this->success($services->getChatMemberList((int)$id, $name));
- }
- }
|