DengBiao il y a 1 an
Parent
révision
459aefd628
2 fichiers modifiés avec 10 ajouts et 8 suppressions
  1. +5
    -4
      consume/dou_shen_user_register_for_my_my_recommender.go
  2. +5
    -4
      consume/dou_shen_user_register_for_operation_center.go

+ 5
- 4
consume/dou_shen_user_register_for_my_my_recommender.go Voir le fichier

@@ -111,7 +111,7 @@ func handleDouShenUserRegisterConsumeForMyRecommender(msgData []byte) error {
}

//2、查找是否有群
var fansGroup *model2.DouShenImGroup
var fansGroup model2.DouShenImGroup
fansGroups, err := db.DouShenImGroupFindByParamsByKind(db.Db, 3, map[string]interface{}{
"key": "uid",
"value": msg.RecommenderUid,
@@ -129,11 +129,11 @@ func handleDouShenUserRegisterConsumeForMyRecommender(msgData []byte) error {
return err
}
if len(*userGroups) < 500 {
fansGroup = &group
fansGroup = group
}
}

if fansGroup == nil {
if fansGroup.GroupId == 0 {
recommenderUser, err := db.UserFindByID(db.DBs[msg.MasterId], msg.RecommenderUid)
if err != nil {
return err
@@ -174,12 +174,13 @@ func handleDouShenUserRegisterConsumeForMyRecommender(msgData []byte) error {
if err != nil {
return err
}
fansGroup, err = db.DouShenImGroupGetOneByParams(db.Db, 2, map[string]interface{}{
tempFansGroup, err := db.DouShenImGroupGetOneByParams(db.Db, 2, map[string]interface{}{
"group_id": resp.GroupId,
})
if err != nil {
return err
}
fansGroup = *tempFansGroup
}
userGroup, err2 := db2.GroupUserGetOneByParams(db.ImDb, 1, map[string]interface{}{
"key": "group_id",


+ 5
- 4
consume/dou_shen_user_register_for_operation_center.go Voir le fichier

@@ -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",


Chargement…
Annuler
Enregistrer