访客列表返回当前页

master
dlcios 10 months ago
parent ac9e974332
commit 9e46ae0d89
  1. 7
      api/v1/visitor.go
  2. 5
      internal/service/visitor.go

@ -53,7 +53,8 @@ type VisitorListReq struct {
}
type VisitorListRes struct {
g.Meta `mime:"text/html" example:"string"`
List []*entity.VisitorRecord `json:"list"`
Total int `json:"total"`
g.Meta `mime:"text/html" example:"string"`
List []*entity.VisitorRecord `json:"list"`
Current int `json:"current"`
Total int `json:"total"`
}

@ -71,8 +71,9 @@ func (s *visitorService) VisitorList(ctx context.Context, req *v1.VisitorListReq
}
res = &v1.VisitorListRes{
List: records,
Total: total,
List: records,
Total: total,
Current: req.PageNum,
}
return

Loading…
Cancel
Save