DengBiao 1 год назад
Родитель
Сommit
a0a4ea0dc4
4 измененных файлов: 11 добавлений и 11 удалений
  1. +2
    -2
      consume/dou_shen_user_register_for_my_my_fans.go
  2. +2
    -2
      consume/dou_shen_user_register_for_my_my_recommender.go
  3. +5
    -5
      consume/dou_shen_user_register_for_official_consume.go
  4. +2
    -2
      consume/dou_shen_user_register_for_operation_center.go

+ 2
- 2
consume/dou_shen_user_register_for_my_my_fans.go Просмотреть файл

@@ -80,8 +80,8 @@ func handleDouShenUserRegisterConsumeForMyFans(msgData []byte) error {
return err
}
if gimUser == nil {
time.Sleep(time.Duration(10) * time.Second)
gimUser, err := db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{
time.Sleep(time.Duration(1) * time.Second)
gimUser, err = db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{
"key": "phone_number",
"value": msg.Phone,
})


+ 2
- 2
consume/dou_shen_user_register_for_my_my_recommender.go Просмотреть файл

@@ -62,7 +62,7 @@ func DouShenUserRegisterConsumeForMyRecommender(queue md.MqQueue) {
}

func handleDouShenUserRegisterConsumeForMyRecommender(msgData []byte) error {
time.Sleep(time.Duration(10) * time.Second)
time.Sleep(time.Duration(1) * time.Second)
//1、解析mq中queue的数据结构体
var msg *md.DouShenUserRegisterMessageStructForMyRecommender
err := json.Unmarshal(msgData, &msg)
@@ -100,7 +100,7 @@ func handleDouShenUserRegisterConsumeForMyRecommender(msgData []byte) error {
if err != nil {
return err
}
gimUser, err := db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{
gimUser, err = db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{
"key": "id",
"value": gimUserId,
})


+ 5
- 5
consume/dou_shen_user_register_for_official_consume.go Просмотреть файл

@@ -88,7 +88,7 @@ func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error {
return err
}

_, err = db2.UserInsert(db.ImDb, &model2.User{
gimUserId, err := db2.UserInsert(db.ImDb, &model2.User{
PhoneNumber: strconv.FormatInt(msg.Phone, 10),
Nickname: user.Nickname,
AvatarUrl: userProfile.AvatarUrl,
@@ -101,9 +101,9 @@ func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error {
if err != nil {
return err
}
gimUser, err := db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{
"key": "phone_number",
"value": msg.Phone,
gimUser, err = db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{
"key": "id",
"value": gimUserId,
})
if gimUser == nil {
return errors.New("用户暂未注册im系统")
@@ -174,7 +174,7 @@ func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error {
if userGroup == nil {
return errors.New("当前官方群暂未设置群主,请联系管理员!!!")
}
fmt.Println("!!!!!!!!!!", gimUser)
//加入群
_, err = utils.GetLogicExtClient(cfg.ImLogicRpc.URL, cfg.ImLogicRpc.PORT).AddGroupMembers(
utils.GetCtx("", strconv.FormatInt(userGroup.UserId, 10), "", msg.MasterId),


+ 2
- 2
consume/dou_shen_user_register_for_operation_center.go Просмотреть файл

@@ -63,7 +63,7 @@ func DouShenUserRegisterConsumeForOperationCenter(queue md.MqQueue) {
}

func handleDouShenUserRegisterConsumeForOperationCenter(msgData []byte) error {
time.Sleep(time.Duration(10) * time.Second)
time.Sleep(time.Duration(1) * time.Second)
//1、解析mq中queue的数据结构体
var msg *md.DouShenUserRegisterMessageStructForOperationCenter
err := json.Unmarshal(msgData, &msg)
@@ -101,7 +101,7 @@ func handleDouShenUserRegisterConsumeForOperationCenter(msgData []byte) error {
if err != nil {
return err
}
gimUser, err := db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{
gimUser, err = db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{
"key": "id",
"value": gimUserId,
})


Загрузка…
Отмена
Сохранить