智盟项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
679 B

  1. package task
  2. import (
  3. "applet/app/task/svc"
  4. "applet/app/utils"
  5. "fmt"
  6. "math/rand"
  7. "time"
  8. )
  9. func taskSuccessLifeOrderSettle() {
  10. for {
  11. if len(ch) > workerNum {
  12. time.Sleep(time.Millisecond * time.Duration(rand.Intn(1000)))
  13. } else {
  14. goto START
  15. }
  16. }
  17. START:
  18. ch <- 1
  19. month := utils.GetTimeRange("current_month")
  20. fmt.Println(month)
  21. arg := map[string]string{
  22. "status": "订单完成,订单成功",
  23. "sort": "id desc",
  24. "is_to_settle": "2",
  25. "is_commission": "1",
  26. "to_settle_time": utils.Int64ToStr(month["start"]),
  27. "p": "1",
  28. "size": "100",
  29. "pvd": "own_t3car",
  30. }
  31. svc.LifeOrderSettle(arg)
  32. <-ch
  33. }