diff --git a/Server/application/chukebao/controller/WechatChatroomController.php b/Server/application/chukebao/controller/WechatChatroomController.php index 9c33baed2..5d521143c 100644 --- a/Server/application/chukebao/controller/WechatChatroomController.php +++ b/Server/application/chukebao/controller/WechatChatroomController.php @@ -15,7 +15,8 @@ class WechatChatroomController extends BaseController $page = $this->request->param('page', 1); $limit = $this->request->param('limit', 10); $keyword = $this->request->param('keyword', ''); - $groupIds = $this->request->param('groupIds', ''); + $groupIds = $this->request->param('groupId', ''); + $ownerWechatId = $this->request->param('ownerWechatId', ''); $accountId = $this->getUserInfo('s2_accountId'); if (empty($accountId)){ return ResponseHelper::error('请先登录'); @@ -37,6 +38,10 @@ class WechatChatroomController extends BaseController $query->where('groupIds', $groupIds); } + if (!empty($ownerWechatId)) { + $query->where('ownerWechatId', $ownerWechatId); + } + $query->order('id desc'); $total = $query->count(); $list = $query->page($page, $limit)->select(); diff --git a/Server/application/chukebao/controller/WechatFriendController.php b/Server/application/chukebao/controller/WechatFriendController.php index da4782c25..aaf541f11 100644 --- a/Server/application/chukebao/controller/WechatFriendController.php +++ b/Server/application/chukebao/controller/WechatFriendController.php @@ -14,7 +14,8 @@ class WechatFriendController extends BaseController $page = $this->request->param('page', 1); $limit = $this->request->param('limit', 10); $keyword = $this->request->param('keyword', ''); - $groupIds = $this->request->param('groupIds', ''); + $groupIds = $this->request->param('groupId', ''); + $ownerWechatId = $this->request->param('ownerWechatId', ''); $accountId = $this->getUserInfo('s2_accountId'); if (empty($accountId)) { return ResponseHelper::error('请先登录'); @@ -38,6 +39,10 @@ class WechatFriendController extends BaseController $query->where('groupIds', $groupIds); } + if (!empty($ownerWechatId)) { + $query->where('ownerWechatId', $ownerWechatId); + } + $query->order('id desc'); $total = $query->count(); $list = $query->page($page, $limit)->select();