2023-07-20 22:41:13 +08:00
|
|
|
package persistence
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"mayfly-go/internal/machine/domain/entity"
|
|
|
|
|
"mayfly-go/internal/machine/domain/repository"
|
2023-10-26 17:15:49 +08:00
|
|
|
"mayfly-go/pkg/base"
|
2023-07-20 22:41:13 +08:00
|
|
|
"mayfly-go/pkg/model"
|
|
|
|
|
)
|
|
|
|
|
|
2023-10-26 17:15:49 +08:00
|
|
|
type machineCropJobExecRepoImpl struct {
|
|
|
|
|
base.RepoImpl[*entity.MachineCronJobExec]
|
|
|
|
|
}
|
2023-07-20 22:41:13 +08:00
|
|
|
|
|
|
|
|
func newMachineCronJobExecRepo() repository.MachineCronJobExec {
|
2023-10-26 17:15:49 +08:00
|
|
|
return &machineCropJobExecRepoImpl{base.RepoImpl[*entity.MachineCronJobExec]{M: new(entity.MachineCronJobExec)}}
|
2023-07-20 22:41:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 分页获取机器信息列表
|
2023-10-26 17:15:49 +08:00
|
|
|
func (m *machineCropJobExecRepoImpl) GetPageList(condition *entity.MachineCronJobExec, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error) {
|
2024-04-28 23:45:57 +08:00
|
|
|
qd := model.NewModelCond(condition).OrderBy(orderBy...)
|
|
|
|
|
return m.PageByCond(qd, pageParam, toEntity)
|
2023-07-20 22:41:13 +08:00
|
|
|
}
|