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

22 lines
520 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, orderBy ...string) (*model.PageResult[*entity.Msg], error) {
pd := model.NewModelCond(condition).OrderBy(orderBy...)
return m.PageByCond(pd, pageParam)
2021-09-11 14:04:09 +08:00
}