mysql_schedule_task.go 486 B

1234567891011121314151617
  1. package dao
  2. import (
  3. "go-common/app/admin/ep/marthe/model"
  4. pkgerr "github.com/pkg/errors"
  5. )
  6. // InsertScheduleTask Insert Schedule Task.
  7. func (d *Dao) InsertScheduleTask(scheduleTask *model.ScheduleTask) error {
  8. return pkgerr.WithStack(d.db.Create(scheduleTask).Error)
  9. }
  10. // UpdateScheduleTask Update Schedule Task.
  11. func (d *Dao) UpdateScheduleTask(scheduleTask *model.ScheduleTask) error {
  12. return pkgerr.WithStack(d.db.Model(&model.ScheduleTask{}).Updates(scheduleTask).Error)
  13. }