DengBiao пре 1 година
родитељ
комит
55f2d49e04
4 измењених фајлова са 49 додато и 8 уклоњено
  1. +12
    -2
      consume/dou_shen_user_register_for_my_my_fans.go
  2. +12
    -2
      consume/dou_shen_user_register_for_my_my_recommender.go
  3. +12
    -2
      consume/dou_shen_user_register_for_official_consume.go
  4. +13
    -2
      consume/dou_shen_user_register_for_operation_center.go

+ 12
- 2
consume/dou_shen_user_register_for_my_my_fans.go Прегледај датотеку

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

func handleDouShenUserRegisterConsumeForMyFans(msgData []byte) error {
time.Sleep(time.Duration(3) * time.Second)
time.Sleep(time.Duration(4) * time.Second)
//1、解析mq中queue的数据结构体
var msg *md.DouShenUserRegisterMessageStructForMyFans
err := json.Unmarshal(msgData, &msg)
@@ -70,7 +70,17 @@ func handleDouShenUserRegisterConsumeForMyFans(msgData []byte) error {
return err
}
if gimUser == nil {
return errors.New("用户暂未注册im系统")
time.Sleep(time.Duration(4) * 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系统")
}
}

groupName := "我的粉丝[1]群"


+ 12
- 2
consume/dou_shen_user_register_for_my_my_recommender.go Прегледај датотеку

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

func handleDouShenUserRegisterConsumeForMyRecommender(msgData []byte) error {
time.Sleep(time.Duration(3) * time.Second)
time.Sleep(time.Duration(4) * time.Second)
//1、解析mq中queue的数据结构体
var msg *md.DouShenUserRegisterMessageStructForMyRecommender
err := json.Unmarshal(msgData, &msg)
@@ -68,7 +68,17 @@ func handleDouShenUserRegisterConsumeForMyRecommender(msgData []byte) error {
return err
}
if gimUser == nil {
return errors.New("用户暂未注册im系统")
time.Sleep(time.Duration(4) * 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系统")
}
}

//2、查找是否有群


+ 12
- 2
consume/dou_shen_user_register_for_official_consume.go Прегледај датотеку

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

func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error {
time.Sleep(time.Duration(3) * time.Second)
time.Sleep(time.Duration(4) * time.Second)
//1、解析mq中queue的数据结构体
var msg *md.DouShenUserRegisterMessageStructForOfficial
err := json.Unmarshal(msgData, &msg)
@@ -69,7 +69,17 @@ func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error {
return err
}
if gimUser == nil {
return errors.New("用户暂未注册im系统")
time.Sleep(time.Duration(4) * 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系统")
}
}

//2、查找是否有群


+ 13
- 2
consume/dou_shen_user_register_for_operation_center.go Прегледај датотеку

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

func handleDouShenUserRegisterConsumeForOperationCenter(msgData []byte) error {
time.Sleep(time.Duration(3) * time.Second)
time.Sleep(time.Duration(4) * time.Second)
//1、解析mq中queue的数据结构体
var msg *md.DouShenUserRegisterMessageStructForOperationCenter
err := json.Unmarshal(msgData, &msg)
@@ -67,8 +67,19 @@ func handleDouShenUserRegisterConsumeForOperationCenter(msgData []byte) error {
if err != nil {
return err
}

if gimUser == nil {
return errors.New("用户暂未注册im系统")
time.Sleep(time.Duration(4) * 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系统")
}
}

//2、查找是否有群


Loading…
Откажи
Сачувај