From b9879b1cee794934274e80e949b76038ac5d5322 Mon Sep 17 00:00:00 2001 From: wong <106998207@qq.com> Date: Thu, 26 Jun 2025 09:31:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=86=85=E5=AE=B9=E5=BA=93?= =?UTF-8?q?=E5=8F=8A=E9=80=89=E6=8B=A9=E5=A5=BD=E5=8F=8B=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cunkebao/controller/ContentLibraryController.php | 5 +---- .../controller/friend/GetFriendListV1Controller.php | 8 ++++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Server/application/cunkebao/controller/ContentLibraryController.php b/Server/application/cunkebao/controller/ContentLibraryController.php index 7c7ecf5b..43669cf1 100644 --- a/Server/application/cunkebao/controller/ContentLibraryController.php +++ b/Server/application/cunkebao/controller/ContentLibraryController.php @@ -877,7 +877,6 @@ class ContentLibraryController extends Controller ->whereIn('id', $friendIds) ->where('isDeleted', 0) ->select(); - if (empty($friends)) { return [ 'status' => 'failed', @@ -902,8 +901,6 @@ class ContentLibraryController extends Controller } - - // 从s2_wechat_moments表获取朋友圈数据 $moments = Db::table('s2_wechat_moments') ->where([ @@ -911,7 +908,7 @@ class ContentLibraryController extends Controller 'wechatAccountId' => $friend['wechatAccountId'] ]) ->order('createTime', 'desc') - ->where('createTime', '>=', time() - 86400) + //->where('create_time', '>=', time() - 86400) ->select(); if (empty($moments)) { diff --git a/Server/application/cunkebao/controller/friend/GetFriendListV1Controller.php b/Server/application/cunkebao/controller/friend/GetFriendListV1Controller.php index cf523a1c..6f3f3a00 100644 --- a/Server/application/cunkebao/controller/friend/GetFriendListV1Controller.php +++ b/Server/application/cunkebao/controller/friend/GetFriendListV1Controller.php @@ -33,10 +33,10 @@ class GetFriendListV1Controller extends BaseController $where = []; if ($this->getUserInfo('isAdmin') == 1) { - $where[] = ['wf.companyId','=',$this->getUserInfo('companyId')]; + $where[] = ['dw.companyId','=',$this->getUserInfo('companyId')]; $where[] = ['wf.deleteTime','=',0]; } else { - $where[] = ['wf.companyId','=',$this->getUserInfo('companyId')]; + $where[] = ['dw.companyId','=',$this->getUserInfo('companyId')]; $where[] = ['wf.deleteTime','=',0]; //$where[] = ['wf.userId','=',$this->getUserInfo('id')]; } @@ -56,11 +56,11 @@ class GetFriendListV1Controller extends BaseController ->field(['wa1.nickname','wa1.avatar','wa1.alias','wf.id','wf.wechatId','wa2.nickname as ownerNickname','wa2.alias as ownerAlias','wa2.wechatId as ownerWechatId','wf.createTime']) ->Join('wechat_account wa1','wf.wechatId = wa1.wechatId') ->Join('wechat_account wa2','wf.ownerWechatId = wa2.wechatId') - ->join('device_wechat_login dw','wa2.wechatId = dw.wechatId') + ->join('device_wechat_login dw','wa2.wechatId = dw.wechatId AND alive = 1') ->where($where); $total = $data->count(); - $list = $data->page($page, $limit)->order('wf.id DESC')->select(); + $list = $data->page($page, $limit)->order('wf.id DESC')->group('wf.id')->select();