DengBiao преди 1 година
родител
ревизия
f182cef32d
променени са 1 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. +4
    -4
      consume/dou_shen_user_register_for_official_consume.go

+ 4
- 4
consume/dou_shen_user_register_for_official_consume.go Целия файл

@@ -112,7 +112,7 @@ func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error {

//2、查找是否有群
//officialGroup, err := db.DouShenImGroupGetOneByParamsForOfficial(db.Db, 1)
var officialGroup *model.DouShenImGroup
var officialGroup model.DouShenImGroup
officialGroups, err := db.DouShenImGroupFindByParams(db.Db, map[string]interface{}{
"key": "kind",
"value": 1,
@@ -121,7 +121,7 @@ func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error {
return err
}
for _, group := range *officialGroups {
if officialGroup != nil {
if officialGroup.GroupId != 0 {
continue
}
//统计当前群有多少人
@@ -130,11 +130,11 @@ func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error {
"value": group.GroupId,
})
if len(*userGroups) < 500 {
officialGroup = &group
officialGroup = group
}
}

if officialGroup == nil {
if officialGroup.GroupId == 0 {
groupName := "官方【" + utils2.AnyToString(len(*officialGroups)+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{


Зареждане…
Отказ
Запис