DengBiao 1 vuosi sitten
vanhempi
commit
459aefd628
2 muutettua tiedostoa jossa 10 lisäystä ja 8 poistoa
  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 Näytä tiedosto

@@ -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 Näytä tiedosto

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


Ladataan…
Peruuta
Tallenna