2024-02-29 22:12:50 +08:00
|
|
|
package persistence
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"mayfly-go/internal/flow/domain/entity"
|
|
|
|
|
"mayfly-go/internal/flow/domain/repository"
|
|
|
|
|
"mayfly-go/pkg/base"
|
|
|
|
|
"mayfly-go/pkg/model"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type procinstImpl struct {
|
|
|
|
|
base.RepoImpl[*entity.Procinst]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func newProcinstRepo() repository.Procinst {
|
2024-12-08 13:04:23 +08:00
|
|
|
return &procinstImpl{}
|
2024-02-29 22:12:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (p *procinstImpl) GetPageList(condition *entity.ProcinstQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error) {
|
2024-04-28 23:45:57 +08:00
|
|
|
qd := model.NewModelCond(condition)
|
2024-05-05 14:53:30 +08:00
|
|
|
return p.PageByCondToAny(qd, pageParam, toEntity)
|
2024-02-29 22:12:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//-----------procinst task--------------
|
|
|
|
|
|
|
|
|
|
type procinstTaskImpl struct {
|
|
|
|
|
base.RepoImpl[*entity.ProcinstTask]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func newProcinstTaskRepo() repository.ProcinstTask {
|
2024-12-08 13:04:23 +08:00
|
|
|
return &procinstTaskImpl{}
|
2024-02-29 22:12:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (p *procinstTaskImpl) GetPageList(condition *entity.ProcinstTaskQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error) {
|
2024-04-28 23:45:57 +08:00
|
|
|
qd := model.NewModelCond(condition)
|
2024-05-05 14:53:30 +08:00
|
|
|
return p.PageByCondToAny(qd, pageParam, toEntity)
|
2024-02-29 22:12:50 +08:00
|
|
|
}
|