From b5a868b4393facfdac430bb514002559988b2ffa Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Sat, 22 Apr 2023 18:18:43 +0800 Subject: [PATCH] update --- consume/dou_shen_user_register_for_my_my_fans.go | 2 +- .../dou_shen_user_register_for_my_my_recommender.go | 10 ++++++---- consume/dou_shen_user_register_for_official_consume.go | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/consume/dou_shen_user_register_for_my_my_fans.go b/consume/dou_shen_user_register_for_my_my_fans.go index fe3c4fe..4e42611 100644 --- a/consume/dou_shen_user_register_for_my_my_fans.go +++ b/consume/dou_shen_user_register_for_my_my_fans.go @@ -83,7 +83,7 @@ func handleDouShenUserRegisterConsumeForMyFans(msgData []byte) error { } } - groupName := "我的粉丝[1]群" + groupName := "我的粉丝【1】群" //3、创建群 resp, err := utils.GetLogicExtClient(cfg.ImLogicRpc.URL, cfg.ImLogicRpc.PORT).CreateGroup(utils.GetCtx("", utils2.Int64ToStr(gimUser.Id), "", msg.MasterId), &pb.CreateGroupReq{ Name: groupName, diff --git a/consume/dou_shen_user_register_for_my_my_recommender.go b/consume/dou_shen_user_register_for_my_my_recommender.go index 5ad175e..3844f7c 100644 --- a/consume/dou_shen_user_register_for_my_my_recommender.go +++ b/consume/dou_shen_user_register_for_my_my_recommender.go @@ -100,10 +100,12 @@ func handleDouShenUserRegisterConsumeForMyRecommender(msgData []byte) error { return errors.New("当前推荐人群暂未设置群主,请联系管理员!!!") } //加入群 - _, err = utils.GetLogicExtClient(cfg.ImLogicRpc.URL, cfg.ImLogicRpc.PORT).AddGroupMembers(utils.GetCtx("", strconv.FormatInt(userGroup.UserId, 10), "", msg.MasterId), &pb.AddGroupMembersReq{ - GroupId: int64(fansGroup.GroupId), - UserIds: []int64{gimUser.Id}, - }) + _, err = utils.GetLogicExtClient(cfg.ImLogicRpc.URL, cfg.ImLogicRpc.PORT).AddGroupMembers( + utils.GetCtx("", strconv.FormatInt(userGroup.UserId, 10), "", msg.MasterId), + &pb.AddGroupMembersReq{ + GroupId: int64(fansGroup.GroupId), + UserIds: []int64{gimUser.Id}, + }) } return nil } diff --git a/consume/dou_shen_user_register_for_official_consume.go b/consume/dou_shen_user_register_for_official_consume.go index 2d35771..680c398 100644 --- a/consume/dou_shen_user_register_for_official_consume.go +++ b/consume/dou_shen_user_register_for_official_consume.go @@ -88,7 +88,7 @@ func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error { return err } if officialGroup == nil { - groupName := "官方[1]群" + groupName := "官方【1】群" //3、创建群 resp, err := utils.GetLogicExtClient(cfg.ImLogicRpc.URL, cfg.ImLogicRpc.PORT).CreateGroup(utils.GetCtx("", strconv.FormatInt(gimUser.Id, 10), "0", msg.MasterId), &pb.CreateGroupReq{ Name: groupName, @@ -128,7 +128,8 @@ func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error { } //加入群 _, err = utils.GetLogicExtClient(cfg.ImLogicRpc.URL, cfg.ImLogicRpc.PORT).AddGroupMembers( - utils.GetCtx("", strconv.FormatInt(userGroup.UserId, 10), "", msg.MasterId), &pb.AddGroupMembersReq{ + utils.GetCtx("", strconv.FormatInt(userGroup.UserId, 10), "", msg.MasterId), + &pb.AddGroupMembersReq{ GroupId: int64(officialGroup.GroupId), UserIds: []int64{gimUser.Id}, })