修改model写法

This commit is contained in:
linwenxiang committed 2020-08-29 19:32:22 +08:00
1 parent 05b53c0710
commit 78417c2d33
3 files changed
+17 -27

No files matched your search

+3 -2
View File
@@ -93,7 +93,8 @@ func Setup() {
global.GADMCron = cronjob.NewWithSeconds()
sysJob := models.SysJob{}
jobList, err := sysJob.GetList()
jobList := make([]models.SysJob, 0)
err := sysJob.GetList(&jobList)
if err != nil {
fmt.Println(time.Now().Format(timeFormat), " [ERROR] JobCore init error", err)
}
@@ -124,7 +125,7 @@ func Setup() {
j.Args = jobList[i].Args
sysJob.EntryId, err = AddJob(j)
}
_, err = sysJob.Update(jobList[i].JobId)
err = sysJob.Update(jobList[i].JobId)
}
// 其中任务