Files
mayfly-go/server/internal/msg/api/msg.go

24 lines
491 B
Go
Raw Normal View History

2023-07-03 21:42:04 +08:00
package api
import (
"mayfly-go/internal/msg/application"
"mayfly-go/internal/msg/domain/entity"
"mayfly-go/pkg/biz"
2023-07-03 21:42:04 +08:00
"mayfly-go/pkg/ginx"
"mayfly-go/pkg/req"
)
type Msg struct {
MsgApp application.Msg
}
// 获取账号接收的消息列表
func (m *Msg) GetMsgs(rc *req.Ctx) {
condition := &entity.Msg{
RecipientId: int64(rc.LoginAccount.Id),
}
res, err := m.MsgApp.GetPageList(condition, ginx.GetPageParam(rc.GinCtx), new([]entity.Msg))
biz.ErrIsNil(err)
rc.ResData = res
2023-07-03 21:42:04 +08:00
}