|
@@ -14,6 +14,7 @@ import ( |
|
|
"errors" |
|
|
"errors" |
|
|
"fmt" |
|
|
"fmt" |
|
|
"github.com/streadway/amqp" |
|
|
"github.com/streadway/amqp" |
|
|
|
|
|
"strconv" |
|
|
"time" |
|
|
"time" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
@@ -78,7 +79,7 @@ func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error { |
|
|
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("", "11", "4", 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, |
|
|
AvatarUrl: "", |
|
|
AvatarUrl: "", |
|
|
Introduction: "官方群", |
|
|
Introduction: "官方群", |
|
@@ -92,7 +93,7 @@ func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error { |
|
|
now := time.Now() |
|
|
now := time.Now() |
|
|
_, err = db.DouShenImGroupInsert(db.Db, &model.DouShenImGroup{ |
|
|
_, err = db.DouShenImGroupInsert(db.Db, &model.DouShenImGroup{ |
|
|
Kind: 1, |
|
|
Kind: 1, |
|
|
Uid: 21, |
|
|
|
|
|
|
|
|
Uid: int(msg.Uid), |
|
|
GroupId: int(resp.GroupId), |
|
|
GroupId: int(resp.GroupId), |
|
|
IsFull: 0, |
|
|
IsFull: 0, |
|
|
Name: groupName, |
|
|
Name: groupName, |
|
|