feat: 数据库表格数据表头支持展示备注

This commit is contained in:
meilin.huang
2024-01-09 12:19:20 +08:00
parent d3d26c85c3
commit 3c89a285f5
9 changed files with 65 additions and 2088 deletions

View File

@@ -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)