[fix] 修复清空删除任务日志

This commit is contained in:
PandaX
2023-11-22 08:05:51 +08:00
parent a1b9bf081c
commit e7b050f59b
4 changed files with 11 additions and 11 deletions

View File

@@ -85,7 +85,7 @@ func (l *JobApi) StartJobForService(rc *restfulx.ReqCtx) {
j.OrgId = job.OrgId
j.Owner = job.Owner
job.EntryId, err = jobs.AddJob(jobs.Crontab, j)
biz.ErrIsNil(err, "添加JOB失败")
biz.ErrIsNil(err, "添加任务失败,可能任务表达式错误")
l.JobApp.Update(*job)
}

View File

@@ -3,9 +3,9 @@ package api
import (
"github.com/PandaXGO/PandaKit/model"
"github.com/PandaXGO/PandaKit/restfulx"
"github.com/PandaXGO/PandaKit/utils"
"pandax/apps/job/entity"
"pandax/apps/job/services"
"strings"
)
type JobLogApi struct {
@@ -34,8 +34,8 @@ func (l *JobLogApi) GetJobLogList(rc *restfulx.ReqCtx) {
// DeleteJobLog 批量删除登录日志
func (l *JobLogApi) DeleteJobLog(rc *restfulx.ReqCtx) {
logIds := restfulx.QueryParam(rc, "logId")
group := utils.IdsStrToIdsIntGroup(logIds)
logIds := restfulx.PathParam(rc, "id")
group := strings.Split(logIds, ",")
l.JobLogApp.Delete(group)
}