|
|
@@ -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、查找是否有群 |
|
|
|