Skip to content

Commit

Permalink
refactor: 提交订单同时更新信息
Browse files Browse the repository at this point in the history
  • Loading branch information
allen committed Apr 27, 2022
1 parent 67c6ad0 commit f97d98a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions internal/app/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ func (t *Task) AllCheck(wg *sync.WaitGroup) {
continue
}
log.Println("===== 购物车全选 =====")
// <-time.After(time.Second * 5)
return
<-time.After(time.Second * 5)
}
}
}
Expand All @@ -150,8 +149,7 @@ func (t *Task) GetCart(wg *sync.WaitGroup) {
continue
}
t.SetCartMap(cartMap)
// <-time.After(time.Duration(duration) * time.Millisecond)
return
<-time.After(time.Duration(duration) * time.Millisecond)
}
}
}
Expand All @@ -178,8 +176,7 @@ func (t *Task) GetMultiReserveTime(wg *sync.WaitGroup) {
t.SetReserveTime(reserveTime)
log.Println("===== 有效配送时段已更新 =====")
// log.Println("reserveTime => ", json.MustEncodeToString(reserveTime))
// <-time.After(time.Duration(duration) * time.Millisecond)
return
<-time.After(time.Duration(duration) * time.Millisecond)
}
}
}
Expand Down Expand Up @@ -232,8 +229,7 @@ func (t *Task) CheckOrder(wg *sync.WaitGroup) {
}
t.SetCheckOrderMap(checkOrderMap)
log.Println("===== 订单信息已更新 =====")
// <-time.After(time.Duration(duration) * time.Millisecond)
return
<-time.After(time.Duration(duration) * time.Millisecond)
}
}
}
Expand Down

0 comments on commit f97d98a

Please sign in to comment.