Files
mayfly-go/server/internal/db/infrastructure/persistence/db_transfer_file.go
zongyangleo 6343173cf8 !124 一些更新和bug
* fix: 代码合并
* feat:支持数据库版本兼容,目前兼容了oracle11g部分特性
* fix: 修改数据同步bug,数据sql里指定修改字段别,导致未正确记录修改字段值
* feat: 数据库迁移支持定时迁移和迁移到sql文件
2024-10-20 03:52:23 +00:00

26 lines
792 B
Go

package persistence
import (
"mayfly-go/internal/db/domain/entity"
"mayfly-go/internal/db/domain/repository"
"mayfly-go/pkg/base"
"mayfly-go/pkg/model"
)
type dbTransferFileRepoImpl struct {
base.RepoImpl[*entity.DbTransferFile]
}
func newDbTransferFileRepo() repository.DbTransferFile {
return &dbTransferFileRepoImpl{base.RepoImpl[*entity.DbTransferFile]{M: new(entity.DbTransferFile)}}
}
// 分页获取数据库信息列表
func (d *dbTransferFileRepoImpl) GetPageList(condition *entity.DbTransferFileQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error) {
qd := model.NewCond().
Eq("task_id", condition.TaskId).
OrderByDesc("create_time")
//Eq("status", condition.Status)
return d.PageByCondToAny(qd, pageParam, toEntity)
}