mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-01-05 22:25:48 +08:00
feat: dbms新增支持工单流程审批
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package persistence
|
||||
|
||||
import (
|
||||
"mayfly-go/pkg/ioc"
|
||||
)
|
||||
|
||||
func Init() {
|
||||
ioc.Register(newProcdefRepo(), ioc.WithComponentName("ProcdefRepo"))
|
||||
ioc.Register(newProcinstRepo(), ioc.WithComponentName("ProcinstRepo"))
|
||||
ioc.Register(newProcinstTaskRepo(), ioc.WithComponentName("ProcinstTaskRepo"))
|
||||
}
|
||||
24
server/internal/flow/infrastructure/persistence/procdef.go
Normal file
24
server/internal/flow/infrastructure/persistence/procdef.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package persistence
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/flow/domain/entity"
|
||||
"mayfly-go/internal/flow/domain/repository"
|
||||
"mayfly-go/pkg/base"
|
||||
"mayfly-go/pkg/gormx"
|
||||
"mayfly-go/pkg/model"
|
||||
)
|
||||
|
||||
type procdefImpl struct {
|
||||
base.RepoImpl[*entity.Procdef]
|
||||
}
|
||||
|
||||
func newProcdefRepo() repository.Procdef {
|
||||
return &procdefImpl{base.RepoImpl[*entity.Procdef]{M: new(entity.Procdef)}}
|
||||
}
|
||||
|
||||
func (p *procdefImpl) GetPageList(condition *entity.Procdef, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error) {
|
||||
qd := gormx.NewQuery(new(entity.Procdef)).
|
||||
Like("name", condition.Name).
|
||||
Like("def_key", condition.DefKey)
|
||||
return gormx.PageQuery(qd, pageParam, toEntity)
|
||||
}
|
||||
37
server/internal/flow/infrastructure/persistence/procinst.go
Normal file
37
server/internal/flow/infrastructure/persistence/procinst.go
Normal file
@@ -0,0 +1,37 @@
|
||||
package persistence
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/flow/domain/entity"
|
||||
"mayfly-go/internal/flow/domain/repository"
|
||||
"mayfly-go/pkg/base"
|
||||
"mayfly-go/pkg/gormx"
|
||||
"mayfly-go/pkg/model"
|
||||
)
|
||||
|
||||
type procinstImpl struct {
|
||||
base.RepoImpl[*entity.Procinst]
|
||||
}
|
||||
|
||||
func newProcinstRepo() repository.Procinst {
|
||||
return &procinstImpl{base.RepoImpl[*entity.Procinst]{M: new(entity.Procinst)}}
|
||||
}
|
||||
|
||||
func (p *procinstImpl) GetPageList(condition *entity.ProcinstQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error) {
|
||||
qd := gormx.NewQuery(new(entity.Procinst)).WithCondModel(condition)
|
||||
return gormx.PageQuery(qd, pageParam, toEntity)
|
||||
}
|
||||
|
||||
//-----------procinst task--------------
|
||||
|
||||
type procinstTaskImpl struct {
|
||||
base.RepoImpl[*entity.ProcinstTask]
|
||||
}
|
||||
|
||||
func newProcinstTaskRepo() repository.ProcinstTask {
|
||||
return &procinstTaskImpl{base.RepoImpl[*entity.ProcinstTask]{M: new(entity.ProcinstTask)}}
|
||||
}
|
||||
|
||||
func (p *procinstTaskImpl) GetPageList(condition *entity.ProcinstTaskQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error) {
|
||||
qd := gormx.NewQuery(new(entity.ProcinstTask)).WithCondModel(condition)
|
||||
return gormx.PageQuery(qd, pageParam, toEntity)
|
||||
}
|
||||
Reference in New Issue
Block a user