Browse Source

update

three
DengBiao 1 year ago
parent
commit
a0a4ea0dc4
4 changed files with 11 additions and 11 deletions
  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 View File

@@ -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 View File

@@ -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 View File

@@ -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 View File

@@ -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,
})


Loading…
Cancel
Save