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"
|
2025-05-20 21:04:47 +08:00
|
|
|
"mayfly-go/pkg/gormx"
|
2024-02-29 22:12:50 +08:00
|
|
|
"mayfly-go/pkg/model"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type procdefImpl struct {
|
|
|
|
|
base.RepoImpl[*entity.Procdef]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func newProcdefRepo() repository.Procdef {
|
2024-12-08 13:04:23 +08:00
|
|
|
return &procdefImpl{}
|
2024-02-29 22:12:50 +08:00
|
|
|
}
|
|
|
|
|
|
2025-05-20 21:04:47 +08:00
|
|
|
func (p *procdefImpl) GetPageList(condition *entity.Procdef, pageParam model.PageParam, orderBy ...string) (*model.PageResult[*entity.ProcdefPagePO], error) {
|
2024-04-28 23:45:57 +08:00
|
|
|
qd := model.NewCond().
|
2024-02-29 22:12:50 +08:00
|
|
|
Like("name", condition.Name).
|
|
|
|
|
Like("def_key", condition.DefKey)
|
2025-05-20 21:04:47 +08:00
|
|
|
|
|
|
|
|
var res []*entity.ProcdefPagePO
|
|
|
|
|
return gormx.PageByCond(p.GetModel(), qd, pageParam, res)
|
2024-02-29 22:12:50 +08:00
|
|
|
}
|