|
@@ -15,31 +15,15 @@ func Overview(c *gin.Context) {
|
|
|
form := request.Check(c, &struct {
|
|
form := request.Check(c, &struct {
|
|
|
Day string `form:"day" json:"day" binding:"required"`
|
|
Day string `form:"day" json:"day" binding:"required"`
|
|
|
}{})
|
|
}{})
|
|
|
-
|
|
|
|
|
- //start := time.Now()
|
|
|
|
|
- //day := start.Format("20060102")
|
|
|
|
|
- //hour := start.Format("2006010215")
|
|
|
|
|
-
|
|
|
|
|
//查询接口访问次数
|
|
//查询接口访问次数
|
|
|
dayCount, err := global.App.Redis.Get(context.Background(), "dayLog:"+form.Day).Result()
|
|
dayCount, err := global.App.Redis.Get(context.Background(), "dayLog:"+form.Day).Result()
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
global.App.Log.Error("redis incr error", "err", err)
|
|
global.App.Log.Error("redis incr error", "err", err)
|
|
|
}
|
|
}
|
|
|
- //hourCount, err := global.App.Redis.Get(context.Background(), "hourInterfaceLog:"+hour).Result()
|
|
|
|
|
- //if err != nil {
|
|
|
|
|
- // global.App.Log.Error("redis incr error", "err", err)
|
|
|
|
|
- //}
|
|
|
|
|
-
|
|
|
|
|
- //查询登录人数
|
|
|
|
|
- //hourLoginLog, err := global.App.Redis.Get(context.Background(), "hourLoginLog:"+hour).Result()
|
|
|
|
|
- //if err != nil {
|
|
|
|
|
- // global.App.Log.Error("redis incr error", "err", err)
|
|
|
|
|
- //}
|
|
|
|
|
dayLoginLog, err := global.App.Redis.Get(context.Background(), "dayLog:"+form.Day).Result()
|
|
dayLoginLog, err := global.App.Redis.Get(context.Background(), "dayLog:"+form.Day).Result()
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
global.App.Log.Error("redis get error", "err", err)
|
|
global.App.Log.Error("redis get error", "err", err)
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
//查询新注册人数
|
|
//查询新注册人数
|
|
|
dayRegisterLog, err := global.App.Redis.Get(context.Background(), "registerDayLog:"+form.Day).Result()
|
|
dayRegisterLog, err := global.App.Redis.Get(context.Background(), "registerDayLog:"+form.Day).Result()
|
|
|
if err != nil {
|
|
if err != nil {
|