Browse Source

update

three
DengBiao 1 year ago
parent
commit
8c0e14473a
4 changed files with 52 additions and 12 deletions
  1. +13
    -3
      consume/dou_shen_user_register_for_my_my_fans.go
  2. +13
    -3
      consume/dou_shen_user_register_for_my_my_recommender.go
  3. +13
    -3
      consume/dou_shen_user_register_for_official_consume.go
  4. +13
    -3
      consume/dou_shen_user_register_for_operation_center.go

+ 13
- 3
consume/dou_shen_user_register_for_my_my_fans.go View File

@@ -54,7 +54,7 @@ func DouShenUserRegisterConsumeForMyFans(queue md.MqQueue) {
} }


func handleDouShenUserRegisterConsumeForMyFans(msgData []byte) error { func handleDouShenUserRegisterConsumeForMyFans(msgData []byte) error {
time.Sleep(time.Duration(6) * time.Second)
time.Sleep(time.Duration(10) * time.Second)
//1、解析mq中queue的数据结构体 //1、解析mq中queue的数据结构体
var msg *md.DouShenUserRegisterMessageStructForMyFans var msg *md.DouShenUserRegisterMessageStructForMyFans
err := json.Unmarshal(msgData, &msg) err := json.Unmarshal(msgData, &msg)
@@ -70,7 +70,7 @@ func handleDouShenUserRegisterConsumeForMyFans(msgData []byte) error {
return err return err
} }
if gimUser == nil { if gimUser == nil {
time.Sleep(time.Duration(10) * time.Second)
time.Sleep(time.Duration(20) * time.Second)
gimUser, err := db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{ gimUser, err := db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{
"key": "phone_number", "key": "phone_number",
"value": msg.Phone, "value": msg.Phone,
@@ -79,7 +79,17 @@ func handleDouShenUserRegisterConsumeForMyFans(msgData []byte) error {
return err return err
} }
if gimUser == nil { if gimUser == nil {
return errors.New("用户暂未注册im系统")
time.Sleep(time.Duration(30) * time.Second)
gimUser, err := db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{
"key": "phone_number",
"value": msg.Phone,
})
if err != nil {
return err
}
if gimUser == nil {
return errors.New("用户暂未注册im系统")
}
} }
} }




+ 13
- 3
consume/dou_shen_user_register_for_my_my_recommender.go View File

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


func handleDouShenUserRegisterConsumeForMyRecommender(msgData []byte) error { func handleDouShenUserRegisterConsumeForMyRecommender(msgData []byte) error {
time.Sleep(time.Duration(6) * time.Second)
time.Sleep(time.Duration(10) * time.Second)
//1、解析mq中queue的数据结构体 //1、解析mq中queue的数据结构体
var msg *md.DouShenUserRegisterMessageStructForMyRecommender var msg *md.DouShenUserRegisterMessageStructForMyRecommender
err := json.Unmarshal(msgData, &msg) err := json.Unmarshal(msgData, &msg)
@@ -68,7 +68,7 @@ func handleDouShenUserRegisterConsumeForMyRecommender(msgData []byte) error {
return err return err
} }
if gimUser == nil { if gimUser == nil {
time.Sleep(time.Duration(10) * time.Second)
time.Sleep(time.Duration(20) * time.Second)
gimUser, err := db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{ gimUser, err := db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{
"key": "phone_number", "key": "phone_number",
"value": msg.Phone, "value": msg.Phone,
@@ -77,7 +77,17 @@ func handleDouShenUserRegisterConsumeForMyRecommender(msgData []byte) error {
return err return err
} }
if gimUser == nil { if gimUser == nil {
return errors.New("用户暂未注册im系统")
time.Sleep(time.Duration(30) * time.Second)
gimUser, err := db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{
"key": "phone_number",
"value": msg.Phone,
})
if err != nil {
return err
}
if gimUser == nil {
return errors.New("用户暂未注册im系统")
}
} }
} }




+ 13
- 3
consume/dou_shen_user_register_for_official_consume.go View File

@@ -53,7 +53,7 @@ func DouShenUserRegisterConsumeForOfficial(queue md.MqQueue) {
} }


func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error { func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error {
time.Sleep(time.Duration(6) * time.Second)
time.Sleep(time.Duration(10) * time.Second)
//1、解析mq中queue的数据结构体 //1、解析mq中queue的数据结构体
var msg *md.DouShenUserRegisterMessageStructForOfficial var msg *md.DouShenUserRegisterMessageStructForOfficial
err := json.Unmarshal(msgData, &msg) err := json.Unmarshal(msgData, &msg)
@@ -69,7 +69,7 @@ func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error {
return err return err
} }
if gimUser == nil { if gimUser == nil {
time.Sleep(time.Duration(10) * time.Second)
time.Sleep(time.Duration(20) * time.Second)
gimUser, err := db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{ gimUser, err := db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{
"key": "phone_number", "key": "phone_number",
"value": msg.Phone, "value": msg.Phone,
@@ -78,7 +78,17 @@ func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error {
return err return err
} }
if gimUser == nil { if gimUser == nil {
return errors.New("用户暂未注册im系统")
time.Sleep(time.Duration(30) * time.Second)
gimUser, err := db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{
"key": "phone_number",
"value": msg.Phone,
})
if err != nil {
return err
}
if gimUser == nil {
return errors.New("用户暂未注册im系统")
}
} }
} }




+ 13
- 3
consume/dou_shen_user_register_for_operation_center.go View File

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


func handleDouShenUserRegisterConsumeForOperationCenter(msgData []byte) error { func handleDouShenUserRegisterConsumeForOperationCenter(msgData []byte) error {
time.Sleep(time.Duration(6) * time.Second)
time.Sleep(time.Duration(10) * time.Second)
//1、解析mq中queue的数据结构体 //1、解析mq中queue的数据结构体
var msg *md.DouShenUserRegisterMessageStructForOperationCenter var msg *md.DouShenUserRegisterMessageStructForOperationCenter
err := json.Unmarshal(msgData, &msg) err := json.Unmarshal(msgData, &msg)
@@ -71,7 +71,7 @@ func handleDouShenUserRegisterConsumeForOperationCenter(msgData []byte) error {
} }


if gimUser == nil { if gimUser == nil {
time.Sleep(time.Duration(10) * time.Second)
time.Sleep(time.Duration(20) * time.Second)
gimUser, err := db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{ gimUser, err := db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{
"key": "phone_number", "key": "phone_number",
"value": msg.Phone, "value": msg.Phone,
@@ -80,7 +80,17 @@ func handleDouShenUserRegisterConsumeForOperationCenter(msgData []byte) error {
return err return err
} }
if gimUser == nil { if gimUser == nil {
return errors.New("用户暂未注册im系统")
time.Sleep(time.Duration(30) * time.Second)
gimUser, err := db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{
"key": "phone_number",
"value": msg.Phone,
})
if err != nil {
return err
}
if gimUser == nil {
return errors.New("用户暂未注册im系统")
}
} }
} }




Loading…
Cancel
Save