mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-25 10:30:25 +08:00
refactor: code review
This commit is contained in:
20
server/internal/msg/api/msg.go
Normal file
20
server/internal/msg/api/msg.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/msg/application"
|
||||
"mayfly-go/internal/msg/domain/entity"
|
||||
"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),
|
||||
}
|
||||
rc.ResData = m.MsgApp.GetPageList(condition, ginx.GetPageParam(rc.GinCtx), new([]entity.Msg))
|
||||
}
|
||||
Reference in New Issue
Block a user