mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-16 04:36:35 +08:00
feat: flow design & page query refactor
This commit is contained in:
@@ -16,24 +16,24 @@ func newDataSyncTaskRepo() repository.DataSyncTask {
|
||||
}
|
||||
|
||||
// 分页获取数据库信息列表
|
||||
func (d *dataSyncTaskRepoImpl) GetTaskList(condition *entity.DataSyncTaskQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error) {
|
||||
func (d *dataSyncTaskRepoImpl) GetTaskList(condition *entity.DataSyncTaskQuery, orderBy ...string) (*model.PageResult[*entity.DataSyncTask], error) {
|
||||
qd := model.NewCond().
|
||||
Like("task_name", condition.Name).
|
||||
Eq("status", condition.Status)
|
||||
return d.PageByCondToAny(qd, pageParam, toEntity)
|
||||
return d.PageByCond(qd, condition.PageParam)
|
||||
}
|
||||
|
||||
type dataSyncLogRepoImpl struct {
|
||||
base.RepoImpl[*entity.DataSyncLog]
|
||||
}
|
||||
|
||||
// 分页获取数据库信息列表
|
||||
func (d *dataSyncLogRepoImpl) GetTaskLogList(condition *entity.DataSyncLogQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error) {
|
||||
qd := model.NewCond().
|
||||
Eq("task_id", condition.TaskId)
|
||||
return d.PageByCondToAny(qd, pageParam, toEntity)
|
||||
}
|
||||
|
||||
func newDataSyncLogRepo() repository.DataSyncLog {
|
||||
return &dataSyncLogRepoImpl{}
|
||||
}
|
||||
|
||||
// 分页获取数据库信息列表
|
||||
func (d *dataSyncLogRepoImpl) GetTaskLogList(condition *entity.DataSyncLogQuery, orderBy ...string) (*model.PageResult[*entity.DataSyncLog], error) {
|
||||
qd := model.NewCond().
|
||||
Eq("task_id", condition.TaskId)
|
||||
return d.PageByCond(qd, condition.PageParam)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user