Browse Source

update

three
DengBiao 1 year ago
parent
commit
b5a868b439
3 changed files with 10 additions and 7 deletions
  1. +1
    -1
      consume/dou_shen_user_register_for_my_my_fans.go
  2. +6
    -4
      consume/dou_shen_user_register_for_my_my_recommender.go
  3. +3
    -2
      consume/dou_shen_user_register_for_official_consume.go

+ 1
- 1
consume/dou_shen_user_register_for_my_my_fans.go View File

@@ -83,7 +83,7 @@ func handleDouShenUserRegisterConsumeForMyFans(msgData []byte) error {
} }
} }


groupName := "我的粉丝[1]群"
groupName := "我的粉丝【1】群"
//3、创建群 //3、创建群
resp, err := utils.GetLogicExtClient(cfg.ImLogicRpc.URL, cfg.ImLogicRpc.PORT).CreateGroup(utils.GetCtx("", utils2.Int64ToStr(gimUser.Id), "", msg.MasterId), &pb.CreateGroupReq{ resp, err := utils.GetLogicExtClient(cfg.ImLogicRpc.URL, cfg.ImLogicRpc.PORT).CreateGroup(utils.GetCtx("", utils2.Int64ToStr(gimUser.Id), "", msg.MasterId), &pb.CreateGroupReq{
Name: groupName, Name: groupName,


+ 6
- 4
consume/dou_shen_user_register_for_my_my_recommender.go View File

@@ -100,10 +100,12 @@ func handleDouShenUserRegisterConsumeForMyRecommender(msgData []byte) error {
return errors.New("当前推荐人群暂未设置群主,请联系管理员!!!") 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 return nil
} }

+ 3
- 2
consume/dou_shen_user_register_for_official_consume.go View File

@@ -88,7 +88,7 @@ func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error {
return err return err
} }
if officialGroup == nil { if officialGroup == nil {
groupName := "官方[1]群"
groupName := "官方【1】群"
//3、创建群 //3、创建群
resp, err := utils.GetLogicExtClient(cfg.ImLogicRpc.URL, cfg.ImLogicRpc.PORT).CreateGroup(utils.GetCtx("", strconv.FormatInt(gimUser.Id, 10), "0", msg.MasterId), &pb.CreateGroupReq{ 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, Name: groupName,
@@ -128,7 +128,8 @@ func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error {
} }
//加入群 //加入群
_, err = utils.GetLogicExtClient(cfg.ImLogicRpc.URL, cfg.ImLogicRpc.PORT).AddGroupMembers( _, 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), GroupId: int64(officialGroup.GroupId),
UserIds: []int64{gimUser.Id}, UserIds: []int64{gimUser.Id},
}) })


Loading…
Cancel
Save