mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 00:10:25 +08:00 
			
		
		
		
	* fix: 代码合并 * feat:支持数据库版本兼容,目前兼容了oracle11g部分特性 * fix: 修改数据同步bug,数据sql里指定修改字段别,导致未正确记录修改字段值 * feat: 数据库迁移支持定时迁移和迁移到sql文件
		
			
				
	
	
		
			27 lines
		
	
	
		
			837 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			837 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 dbTransferTaskRepoImpl struct {
 | 
						|
	base.RepoImpl[*entity.DbTransferTask]
 | 
						|
}
 | 
						|
 | 
						|
func newDbTransferTaskRepo() repository.DbTransferTask {
 | 
						|
	return &dbTransferTaskRepoImpl{base.RepoImpl[*entity.DbTransferTask]{M: new(entity.DbTransferTask)}}
 | 
						|
}
 | 
						|
 | 
						|
// 分页获取数据库信息列表
 | 
						|
func (d *dbTransferTaskRepoImpl) GetTaskList(condition *entity.DbTransferTaskQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error) {
 | 
						|
	qd := model.NewCond().
 | 
						|
		Like("task_name", condition.Name).
 | 
						|
		Eq("status", condition.Status).
 | 
						|
		Eq("cron_able", condition.CronAble)
 | 
						|
	//Eq("status", condition.Status)
 | 
						|
	return d.PageByCondToAny(qd, pageParam, toEntity)
 | 
						|
}
 |