|
|
@@ -113,7 +113,7 @@ func handleDouShenUserRegisterConsumeForOperationCenter(msgData []byte) error { |
|
|
|
|
|
|
|
//2、查找是否有群 |
|
|
|
//OperationGroup, err := db.DouShenImGroupGetOneByParamsForFans(db.Db, 2, msg.OperationCenterUid) |
|
|
|
var OperationGroup *model2.DouShenImGroup |
|
|
|
var OperationGroup model2.DouShenImGroup |
|
|
|
operationGroups, err := db.DouShenImGroupFindByParamsByKind(db.Db, 2, map[string]interface{}{ |
|
|
|
"key": "uid", |
|
|
|
"value": msg.OperationCenterUid, |
|
|
@@ -131,11 +131,11 @@ func handleDouShenUserRegisterConsumeForOperationCenter(msgData []byte) error { |
|
|
|
return err |
|
|
|
} |
|
|
|
if len(*userGroups) < 500 { |
|
|
|
OperationGroup = &group |
|
|
|
OperationGroup = group |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if OperationGroup == nil { |
|
|
|
if OperationGroup.GroupId == 0 { |
|
|
|
//创建运营中心群 |
|
|
|
operationCenterUser, err := db.UserFindByID(db.DBs[msg.MasterId], msg.OperationCenterUid) |
|
|
|
if err != nil { |
|
|
@@ -188,12 +188,13 @@ func handleDouShenUserRegisterConsumeForOperationCenter(msgData []byte) error { |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|
OperationGroup, err = db.DouShenImGroupGetOneByParams(db.Db, 2, map[string]interface{}{ |
|
|
|
tmpOperationGroup, err := db.DouShenImGroupGetOneByParams(db.Db, 2, map[string]interface{}{ |
|
|
|
"group_id": resp.GroupId, |
|
|
|
}) |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|
OperationGroup = *tmpOperationGroup |
|
|
|
} |
|
|
|
userGroup, err2 := db2.GroupUserGetOneByParams(db.ImDb, 1, map[string]interface{}{ |
|
|
|
"key": "group_id", |
|
|
|