mirror of https://github.com/go-sonic/sonic.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
562 B
Go
26 lines
562 B
Go
package admin
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"github.com/go-sonic/sonic/service"
|
|
)
|
|
|
|
type StatisticHandler struct {
|
|
StatisticService service.StatisticService
|
|
}
|
|
|
|
func NewStatisticHandler(l service.StatisticService) *StatisticHandler {
|
|
return &StatisticHandler{
|
|
StatisticService: l,
|
|
}
|
|
}
|
|
|
|
func (s *StatisticHandler) Statistics(ctx *gin.Context) (interface{}, error) {
|
|
return s.StatisticService.Statistic(ctx)
|
|
}
|
|
|
|
func (s *StatisticHandler) StatisticsWithUser(ctx *gin.Context) (interface{}, error) {
|
|
return s.StatisticService.StatisticWithUser(ctx)
|
|
}
|