scrm-go

main.go 632B

123456789101112131415161718192021222324252627282930313233343536
  1. package main
  2. import (
  3. "SCRM/jobcron"
  4. _ "SCRM/routers"
  5. "SCRM/service"
  6. "SCRM/service/site_service"
  7. "github.com/astaxie/beego"
  8. )
  9. func init() {
  10. service.ConnectDB()
  11. }
  12. func main() {
  13. //微信开放平台
  14. go func() {
  15. // jobcron.RequestComponentAccessToken()
  16. // jobcron.RequestMpWechatAccessToken()
  17. // jobcron.ReqJsapiTicket()
  18. }()
  19. jobcron.StartOpenWechatCron()
  20. jobcron.BeginSendUnsendSMSCronJob()
  21. jobcron.CreateActivityShortURLIfNeeded()
  22. jobcron.BeginCreateActivityShortURLCronJob()
  23. go jobcron.RequestQNToken()
  24. jobcron.BeginRerequestQNTokenCronJob()
  25. site_service.BeginAutoCreateDefalutData()
  26. beego.Run()
  27. }