mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-02 23:40:24 +08:00
25 lines
715 B
Go
25 lines
715 B
Go
package persistence
|
|
|
|
import (
|
|
"mayfly-go/internal/sys/domain/entity"
|
|
"mayfly-go/internal/sys/domain/repository"
|
|
"mayfly-go/pkg/gormx"
|
|
"mayfly-go/pkg/model"
|
|
)
|
|
|
|
type syslogRepoImpl struct{}
|
|
|
|
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).Like("description", condition.Description).
|
|
Eq("creator_id", condition.CreatorId).Eq("type", condition.Type).WithOrderBy(orderBy...)
|
|
return gormx.PageQuery(qd, pageParam, toEntity)
|
|
}
|
|
|
|
func (m *syslogRepoImpl) Insert(syslog *entity.Syslog) {
|
|
gormx.Insert(syslog)
|
|
}
|