enterprise/cmd/enterprise.go

34 lines
565 B
Go
Raw Normal View History

2023-08-04 11:13:41 +08:00
package main
import (
"enterprise/common/config"
"enterprise/common/global"
2024-01-07 22:54:33 +08:00
"enterprise/common/model"
2023-08-04 11:13:41 +08:00
"enterprise/server"
"enterprise/worker"
2024-01-07 18:53:21 +08:00
"time"
2023-08-04 11:13:41 +08:00
)
2024-01-07 22:54:33 +08:00
func main() {
2023-08-04 11:13:41 +08:00
config.LoadServerConfig()
global.InitGlobal()
2023-09-04 22:21:04 +08:00
if err := worker.Init(); err != nil {
panic(err)
}
2023-08-04 11:13:41 +08:00
if err := server.Start(); err != nil {
panic(err)
}
}
2023-08-08 23:54:30 +08:00
2024-01-07 22:54:33 +08:00
func main22() {
2023-08-08 23:54:30 +08:00
config.LoadServerConfig()
2024-01-07 17:17:33 +08:00
global.InitGlobal()
//cfg := config.GetConfig()
2024-01-07 18:53:21 +08:00
for i := 0; i < 10; i++ {
2024-01-07 23:23:37 +08:00
new(worker.Approval).Sync(time.Now().AddDate(0, 0-i, 0).Format("200601"), model.ApprovalTypeRefund)
2024-01-07 18:53:21 +08:00
}
2023-08-08 23:54:30 +08:00
}