2023-12-05 23:03:51 +08:00
|
|
|
package persistence
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"mayfly-go/internal/machine/domain/entity"
|
|
|
|
|
"mayfly-go/internal/machine/domain/repository"
|
|
|
|
|
"mayfly-go/pkg/base"
|
|
|
|
|
"mayfly-go/pkg/model"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type machineTermOpRepoImpl struct {
|
|
|
|
|
base.RepoImpl[*entity.MachineTermOp]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func newMachineTermOpRepoImpl() repository.MachineTermOp {
|
2024-12-08 13:04:23 +08:00
|
|
|
return &machineTermOpRepoImpl{}
|
2023-12-05 23:03:51 +08:00
|
|
|
}
|
|
|
|
|
|
2025-05-20 21:04:47 +08:00
|
|
|
func (m *machineTermOpRepoImpl) GetPageList(condition *entity.MachineTermOp, pageParam model.PageParam, orderBy ...string) (*model.PageResult[*entity.MachineTermOp], error) {
|
2024-04-28 23:45:57 +08:00
|
|
|
pd := model.NewModelCond(condition).OrderBy(orderBy...)
|
2025-05-20 21:04:47 +08:00
|
|
|
return m.PageByCond(pd, pageParam)
|
2023-12-05 23:03:51 +08:00
|
|
|
}
|
2024-01-15 20:51:41 +08:00
|
|
|
|
|
|
|
|
// 根据条件获取记录列表
|
|
|
|
|
func (m *machineTermOpRepoImpl) SelectByQuery(cond *entity.MachineTermOpQuery) ([]*entity.MachineTermOp, error) {
|
2024-04-28 23:45:57 +08:00
|
|
|
qd := model.NewCond().Le("create_time", cond.StartCreateTime)
|
2024-05-05 14:53:30 +08:00
|
|
|
return m.SelectByCond(qd)
|
2024-01-15 20:51:41 +08:00
|
|
|
}
|