From 02f9389be7338b382d9caca0d3a67b6966215c1d Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq.com> Date: Mon, 8 Sep 2025 15:52:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BE=A4=E8=81=8A=E6=96=B0=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E5=A5=BD=E5=8F=8B=E5=8F=AF=E4=BB=A5=E7=9C=8B=E5=88=B0=E7=BE=A4?= =?UTF-8?q?=E4=B8=8A=E4=B8=80=E6=9D=A1=E6=B6=88=E6=81=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/enterprise/model/Group.php | 2 +- app/enterprise/model/User.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/enterprise/model/Group.php b/app/enterprise/model/Group.php index dc17b16..95efa88 100644 --- a/app/enterprise/model/Group.php +++ b/app/enterprise/model/Group.php @@ -16,7 +16,7 @@ class Group extends BaseModel public static function getMyGroup($map){ return Db::name('group_user') ->alias('gu') - ->field('gr.group_id,gr.avatar,gr.name as displayName,gu.unread,gr.name_py,gr.owner_id,gr.notice,gu.role,gu.is_notice,gu.is_top,gr.setting') + ->field('gr.group_id,gr.avatar,gr.name as displayName,gu.unread,gr.name_py,gr.owner_id,gr.notice,gu.role,gu.is_notice,gu.is_top,gr.setting,gu.create_time as gu_create_time') ->join('group gr','gu.group_id=gr.group_id','left') ->where($map) ->select(); diff --git a/app/enterprise/model/User.php b/app/enterprise/model/User.php index 16a5e14..0907ae1 100644 --- a/app/enterprise/model/User.php +++ b/app/enterprise/model/User.php @@ -196,6 +196,9 @@ class User extends BaseModel $group[$k]['is_at'] = 0; if ($getGroupLastMsg) { foreach ($getGroupLastMsg as $key=>$val) { + if ($val['lastSendTime'] < $v['gu_create_time']) { + continue; + } if ($val['to_user'] == $v['group_id']) { $group[$k]['type'] =$val['type']; $group[$k]['lastContent'] = str_encipher($val['lastContent'],false);