Files
mayfly-go/server/internal/msg/infrastructure/persistence/msg.go

22 lines
542 B
Go
Raw Normal View History

2021-09-11 14:04:09 +08:00
package persistence
import (
2023-07-03 21:42:04 +08:00
"mayfly-go/internal/msg/domain/entity"
"mayfly-go/internal/msg/domain/repository"
"mayfly-go/pkg/base"
"mayfly-go/pkg/model"
2021-09-11 14:04:09 +08:00
)
type msgRepoImpl struct {
base.RepoImpl[*entity.Msg]
}
2021-09-11 14:04:09 +08:00
2022-09-09 18:26:08 +08:00
func newMsgRepo() repository.Msg {
2024-12-08 13:04:23 +08:00
return &msgRepoImpl{}
2022-09-09 18:26:08 +08:00
}
2021-09-11 14:04:09 +08:00
func (m *msgRepoImpl) GetPageList(condition *entity.Msg, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error) {
pd := model.NewModelCond(condition).OrderBy(orderBy...)
2024-05-05 14:53:30 +08:00
return m.PageByCondToAny(pd, pageParam, toEntity)
2021-09-11 14:04:09 +08:00
}