From fbd791a1f7187c6b855248020c4932b7a70376af Mon Sep 17 00:00:00 2001 From: chenweijian <820961417@qq.com> Date: Tue, 18 Apr 2023 15:52:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E6=96=8B=E8=8A=82=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- domain/service/group_s/group_op.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/domain/service/group_s/group_op.go b/domain/service/group_s/group_op.go index 6618d9e..55efac5 100644 --- a/domain/service/group_s/group_op.go +++ b/domain/service/group_s/group_op.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "git.hilo.cn/hilo-common/domain" + "git.hilo.cn/hilo-common/mycontext" "git.hilo.cn/hilo-common/mylogrus" "git.hilo.cn/hilo-common/resource/config" "git.hilo.cn/hilo-common/resource/mysql" @@ -120,6 +121,7 @@ func (s *GroupService) LeaveGroupMember(model *domain.Model, groupId string, use func (s *GroupService) GroupIn(userId uint64, externalId string, groupUuid string, password, imei, ip string, provider group_e.GroupProvider) (string, string, error) { var channelId string var token string + var rideId uint64 err := s.svc.Transactional(func() error { //检查群组是否存在, 没有真正的domel,直接service上怼 model := domain.CreateModel(s.svc.CtxAndDb) @@ -245,6 +247,7 @@ func (s *GroupService) GroupIn(userId uint64, externalId string, groupUuid strin NobleLevel: nobleLevel, Svip: rpc.CopySimpleSvip(svip), } + rideId = r.RideId buf, err := json.Marshal(r) if err == nil { @@ -276,6 +279,7 @@ func (s *GroupService) GroupIn(userId uint64, externalId string, groupUuid strin if err != nil { return "", "", err } else { + go dealActDataAfterEnterRoom(s.svc.MyContext, userId, rideId) return channelId, token, nil } } @@ -453,3 +457,11 @@ func (s *GroupService) GroupClearScreenByMgr(groupId string, userId uint64) erro signal_s.SendSignalMsg(model, groupId, systemMsg, false) return nil } + +func dealActDataAfterEnterRoom(myContext *mycontext.MyContext, userId, rideId uint64) { + defer utils.CheckGoPanic() + if rideId == 1241 { + // 处理活动数据 + go rpc.AddActPoint(domain.CreateModelContext(myContext), userId, 5) + } +} -- 2.22.0