1234567891011121314151617181920212223242526272829303132333435363738394041 |
- package controller
- import (
- "github.com/gin-gonic/gin"
- "github.com/mhaya/game/game_cluster/nodes/webadmin/entity"
- "github.com/mhaya/game/game_cluster/nodes/webadmin/service"
- )
- type Synthesis struct {
- sev *service.Synthesis
- }
- func NewSynthesis() *Synthesis {
- return &Synthesis{
- sev: service.NewSynthesis(),
- }
- }
- func (s *Synthesis) FindUserLogDaily(ctx *gin.Context) {
- req := &entity.UserLogDailyReq{}
- if err := ctx.ShouldBindJSON(req); err != nil {
- ctx.JSON(200, gin.H{
- "code": 400,
- "msg": err.Error(),
- })
- return
- }
- resp, err := s.sev.FindMDBUserLogDaily(req)
- if err != nil {
- ctx.JSON(200, gin.H{
- "code": 400,
- "msg": err.Error(),
- })
- return
- }
- ctx.JSON(200, gin.H{
- "code": 200,
- "msg": "success",
- "data": resp,
- })
- }
|