SyncCheckinDay
This commit is contained in:
parent
d04c3b50e9
commit
814cff7dd7
|
@ -3,13 +3,11 @@ package main
|
|||
import (
|
||||
"enterprise/common/config"
|
||||
"enterprise/common/global"
|
||||
"enterprise/common/model"
|
||||
"enterprise/server"
|
||||
"enterprise/worker"
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
func main11() {
|
||||
config.LoadServerConfig()
|
||||
global.InitGlobal()
|
||||
|
||||
|
@ -22,12 +20,13 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
func main22() {
|
||||
func main() {
|
||||
config.LoadServerConfig()
|
||||
global.InitGlobal()
|
||||
//cfg := config.GetConfig()
|
||||
for i := 0; i < 10; i++ {
|
||||
new(worker.Approval).Sync(time.Now().AddDate(0, 0-i, 0).Format("200601"), model.ApprovalTypeRefund)
|
||||
}
|
||||
|
||||
new(worker.Checkin).SyncCheckinDay("2024-01-10")
|
||||
new(worker.Checkin).SyncCheckinDay("2024-01-11")
|
||||
new(worker.Checkin).SyncCheckinDay("2024-01-12")
|
||||
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@ address = "0.0.0.0:9283"
|
|||
log_level = 6
|
||||
|
||||
[mysql]
|
||||
host = "192.168.2.50"
|
||||
port = 3306
|
||||
host = "14.22.113.49"
|
||||
port = 9305
|
||||
user = "root"
|
||||
pass = "ZW5aaGVuMIIBIj"
|
||||
db = "enterprise"
|
||||
|
|
|
@ -17,7 +17,7 @@ func Init() error {
|
|||
})
|
||||
|
||||
//同步每日考勤数据
|
||||
cron.Every(1).Day().At("05:00").Do(func() {
|
||||
cron.Every(1).Day().At("10:00").Do(func() {
|
||||
go checkIn.SyncCheckinDay("")
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue