refactor: 代码结构调整

This commit is contained in:
meilin.huang
2022-09-09 18:26:08 +08:00
parent fb3f89c594
commit be00b90c1d
120 changed files with 944 additions and 561 deletions

View File

@@ -7,14 +7,16 @@ import (
"mayfly-go/pkg/model"
)
type msgRepo struct{}
type msgRepoImpl struct{}
var MsgDao repository.Msg = &msgRepo{}
func newMsgRepo() repository.Msg {
return new(msgRepoImpl)
}
func (m *msgRepo) GetPageList(condition *entity.Msg, pageParam *model.PageParam, toEntity interface{}, orderBy ...string) *model.PageResult {
func (m *msgRepoImpl) GetPageList(condition *entity.Msg, pageParam *model.PageParam, toEntity interface{}, orderBy ...string) *model.PageResult {
return model.GetPage(pageParam, condition, toEntity)
}
func (m *msgRepo) Insert(account *entity.Msg) {
func (m *msgRepoImpl) Insert(account *entity.Msg) {
biz.ErrIsNil(model.Insert(account), "新增消息记录失败")
}