!79 feat: 支持自定义数据定时同步

* fix: 达梦数据权限问题
* feat: 支持自定义数据定时同步
This commit is contained in:
zongyangleo
2024-01-05 05:31:32 +00:00
committed by Coder慌
parent 7a7a7020b4
commit 85910bf440
40 changed files with 2059 additions and 68 deletions

View File

@@ -0,0 +1,29 @@
package application
import (
"mayfly-go/internal/db/domain/entity"
"mayfly-go/internal/db/domain/repository"
"mayfly-go/pkg/base"
"mayfly-go/pkg/model"
)
type DataSyncLog interface {
base.App[*entity.DataSyncLog]
// GetTaskLogList 分页获取数据库实例
GetTaskLogList(condition *entity.DataSyncLogQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error)
}
func newDataSyncLogApp(dataSyncRepo repository.DataSyncLog) DataSyncLog {
app := new(dataSyncLogAppImpl)
app.Repo = dataSyncRepo
return app
}
type dataSyncLogAppImpl struct {
base.AppImpl[*entity.DataSyncLog, repository.DataSyncLog]
}
func (app *dataSyncLogAppImpl) GetTaskLogList(condition *entity.DataSyncLogQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error) {
return app.GetRepo().GetTaskLogList(condition, pageParam, toEntity, orderBy...)
}