fix 定时任务日志清理
This commit is contained in:
parent
84f785cd03
commit
8025d56a2b
@ -53,9 +53,9 @@ func (s *sSysJobLog) List(ctx context.Context, req *system.SysJobLogListReq) (li
|
||||
return
|
||||
}
|
||||
|
||||
func (s *sSysJobLog) Delete(ctx context.Context, logIds []uint64) (err error) {
|
||||
func (s *sSysJobLog) Delete(ctx context.Context, targetName string) (err error) {
|
||||
err = g.Try(ctx, func(ctx context.Context) {
|
||||
_, err = dao.SysJobLog.Ctx(ctx).Delete(dao.SysJobLog.Columns().Id+" in (?)", logIds)
|
||||
_, err = dao.SysJobLog.Ctx(ctx).Delete(dao.SysJobLog.Columns().TargetName, targetName)
|
||||
liberr.ErrIsNil(ctx, err, "删除失败")
|
||||
})
|
||||
return
|
||||
|
@ -16,7 +16,7 @@ type (
|
||||
ISysJobLog interface {
|
||||
Add(ctx context.Context, data *do.SysJobLog) (err error)
|
||||
List(ctx context.Context, req *system.SysJobLogListReq) (listRes *system.SysJobLogListRes, err error)
|
||||
Delete(ctx context.Context, logIds []uint64) (err error)
|
||||
Delete(ctx context.Context, targetName string) (err error)
|
||||
}
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user