From f9f151b711e52e203532c07de4ab1ae5bc827691 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Fri, 30 Jun 2023 10:22:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A5=BD=E5=8F=8B=E5=8F=98=E5=8C=96=E9=80=9A?= =?UTF-8?q?=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 1 + modules/friend/api_cross_agree.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/comm/const.go b/comm/const.go index 2a3a5d470..0a62e3026 100644 --- a/comm/const.go +++ b/comm/const.go @@ -350,6 +350,7 @@ const ( EventOpenCond core.Event_Key = "event_open_cond" //功能开放事件 EventBuriedComplete core.Event_Key = "event_buried_complete" //埋点系统条件完成事件批处理接口 接口样例 func(uid string,conids []int32) + EventFriendChange core.Event_Key = "event_friend_change" //加好友 ) const ( diff --git a/modules/friend/api_cross_agree.go b/modules/friend/api_cross_agree.go index a8c99520a..a29fdbb42 100644 --- a/modules/friend/api_cross_agree.go +++ b/modules/friend/api_cross_agree.go @@ -2,6 +2,7 @@ package friend import ( "go_dreamfactory/comm" + "go_dreamfactory/lego/sys/event" "go_dreamfactory/lego/sys/log" "go_dreamfactory/pb" "go_dreamfactory/utils" @@ -150,6 +151,8 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (e } return } + + event.TriggerEvent(comm.EventFriendChange, uid, len(self.FriendIds)) } // 拥有xx个好友