user.go 479 B

123456789101112131415161718
  1. package controller
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "github.com/mhaya/game/game_cluster/internal/code"
  5. "github.com/mhaya/game/game_cluster/nodes/adminapi/common"
  6. "github.com/mhaya/game/game_cluster/nodes/adminapi/service"
  7. )
  8. func GetUserCount(ctx *gin.Context) {
  9. resp := service.GetUserCount()
  10. common.PackOkResult(ctx, code.OK, resp)
  11. }
  12. func GetUserList(ctx *gin.Context) {
  13. resp := service.GetUserList(ctx.Query("userName"))
  14. common.PackOkResult(ctx, code.OK, resp)
  15. }