mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
【升级go 1.18】
This commit is contained in:
@@ -52,7 +52,7 @@ func (j *JobApi) GetJobList(rc *ctx.ReqCtx) {
|
||||
status := rc.GinCtx.Query("status")
|
||||
|
||||
list, total := j.JobApp.FindListPage(pageNum, pageSize, entity.SysJob{JobName: jobName, JobGroup: jobGroup, Status: status})
|
||||
rc.ResData = map[string]interface{}{
|
||||
rc.ResData = map[string]any{
|
||||
"data": list,
|
||||
"total": total,
|
||||
"pageNum": pageNum,
|
||||
|
||||
@@ -18,7 +18,7 @@ func InitJob() {
|
||||
type CronHandle struct {
|
||||
}
|
||||
|
||||
func (t CronHandle) Exec(arg interface{}) error {
|
||||
func (t CronHandle) Exec(arg any) error {
|
||||
str := time.Now().Format(timeFormat) + " [INFO] JobCore ExamplesOne exec success"
|
||||
// TODO: 这里需要注意 Examples 传入参数是 string 所以 arg.(string);请根据对应的类型进行转化;
|
||||
switch arg.(type) {
|
||||
|
||||
@@ -8,9 +8,9 @@ type Job interface {
|
||||
}
|
||||
|
||||
type JobsExec interface {
|
||||
Exec(arg interface{}) error
|
||||
Exec(arg any) error
|
||||
}
|
||||
|
||||
func CallExec(e JobsExec, arg interface{}) error {
|
||||
func CallExec(e JobsExec, arg any) error {
|
||||
return e.Exec(arg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user