Files
mayfly-go/server/internal/sys/infrastructure/persistence/syslog.go

24 lines
629 B
Go
Raw Normal View History

package persistence
import (
"mayfly-go/internal/sys/domain/entity"
"mayfly-go/internal/sys/domain/repository"
"mayfly-go/pkg/gormx"
"mayfly-go/pkg/model"
)
2022-09-09 18:26:08 +08:00
type syslogRepoImpl struct{}
2022-09-09 18:26:08 +08:00
func newSyslogRepo() repository.Syslog {
return new(syslogRepoImpl)
}
func (m *syslogRepoImpl) GetPageList(condition *entity.Syslog, pageParam *model.PageParam, toEntity any, orderBy ...string) *model.PageResult[any] {
qd := gormx.NewQuery(condition).WithCondModel(condition).WithOrderBy(orderBy...)
return gormx.PageQuery(qd, pageParam, toEntity)
}
2022-09-09 18:26:08 +08:00
func (m *syslogRepoImpl) Insert(syslog *entity.Syslog) {
gormx.Insert(syslog)
}