Commit 9ca03009 by Joneq

睡眠

parent 8fd9c05a
...@@ -86,7 +86,7 @@ func handle(userId,saleId int)(result bool) { ...@@ -86,7 +86,7 @@ func handle(userId,saleId int)(result bool) {
//不存在推一个队列,然后停止2秒,再检查 //不存在推一个队列,然后停止2秒,再检查
user_add_queue_logic.PushUserQueue(userId) user_add_queue_logic.PushUserQueue(userId)
time.Sleep(2*time.Second) time.Sleep(8*time.Second)
_ = dao.GetDb().QueryRowx("select user_id from lie_user where outter_uid = ?",userId).Scan(&crmUserId) _ = dao.GetDb().QueryRowx("select user_id from lie_user where outter_uid = ?",userId).Scan(&crmUserId)
if crmUserId == 0{ if crmUserId == 0{
......
...@@ -11,6 +11,7 @@ import ( ...@@ -11,6 +11,7 @@ import (
"github.com/streadway/amqp" "github.com/streadway/amqp"
"log" "log"
"strconv" "strconv"
"time"
) )
var( var(
...@@ -72,6 +73,7 @@ func main(){ ...@@ -72,6 +73,7 @@ func main(){
go func() { go func() {
for d := range msgs { for d := range msgs {
time.Sleep(5*time.Second)
json.Unmarshal(d.Body,&user) json.Unmarshal(d.Body,&user)
fmt.Println(user) fmt.Println(user)
handle(user.User_Id) handle(user.User_Id)
...@@ -85,6 +87,7 @@ func main(){ ...@@ -85,6 +87,7 @@ func main(){
func handle(memberId int)(result bool) { func handle(memberId int)(result bool) {
time.Sleep(5*time.Second)
//获取当前会员的基本数据 //获取当前会员的基本数据
InsertData = logic.GetMemberUserInfo(memberId) InsertData = logic.GetMemberUserInfo(memberId)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment