diff --git a/api/v1/visitor.go b/api/v1/visitor.go index 5c836af..ab7b2b2 100644 --- a/api/v1/visitor.go +++ b/api/v1/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"` } diff --git a/internal/service/visitor.go b/internal/service/visitor.go index 6dcc28c..a55375c 100644 --- a/internal/service/visitor.go +++ b/internal/service/visitor.go @@ -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