mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-25 17:16:33 +08:00
feat: 数据库表格数据表头支持展示备注
This commit is contained in:
@@ -4,12 +4,13 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"gorm.io/gorm"
|
||||
"mayfly-go/internal/db/domain/entity"
|
||||
"mayfly-go/internal/db/domain/repository"
|
||||
"mayfly-go/pkg/gormx"
|
||||
"mayfly-go/pkg/model"
|
||||
"slices"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var _ repository.DbBackup = (*dbBackupRepoImpl)(nil)
|
||||
@@ -61,7 +62,7 @@ func (d *dbBackupRepoImpl) AddTask(ctx context.Context, tasks ...*entity.DbBacku
|
||||
return err
|
||||
}
|
||||
if len(res) > 0 {
|
||||
return errors.New(fmt.Sprintf("数据库备份任务已存在: %v", res))
|
||||
return fmt.Errorf("数据库备份任务已存在: %v", res)
|
||||
}
|
||||
|
||||
return d.BatchInsertWithDb(ctx, db, tasks)
|
||||
|
||||
Reference in New Issue
Block a user