You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
576 B
29 lines
576 B
|
1 year ago
|
package statistics
|
||
|
|
|
||
|
|
import (
|
||
|
|
"github.com/gin-gonic/gin"
|
||
|
|
"server/modules/backend/app"
|
||
|
|
utils "server/modules/backend/util"
|
||
|
|
"server/modules/backend/values"
|
||
|
|
)
|
||
|
|
|
||
|
|
// RechargeKeepData 获取付费留存数据
|
||
|
|
func RechargeKeepData(c *gin.Context) {
|
||
|
|
a := app.NewApp(c)
|
||
|
|
defer func() {
|
||
|
|
a.Response()
|
||
|
|
}()
|
||
|
|
req := new(values.KeepDataReq)
|
||
|
|
if !a.S(req) {
|
||
|
|
return
|
||
|
|
}
|
||
|
|
if req.Start > req.End {
|
||
|
|
a.Code = values.CodeParam
|
||
|
|
return
|
||
|
|
}
|
||
|
|
resp := values.KeepDataResp{}
|
||
|
|
su, eu := utils.GetQueryUnix(req.Start, req.End)
|
||
|
|
resp.List, _ = getPlayerKeep(su, eu, req.Channel)
|
||
|
|
a.Data = resp
|
||
|
|
}
|