get_api_user_vip_handler.go 682 B

12345678910111213141516171819202122232425262728293031
  1. package User
  2. import (
  3. "net/http"
  4. "github.com/zeromicro/go-zero/rest/httpx"
  5. "wechat-api/internal/logic/User"
  6. "wechat-api/internal/svc"
  7. )
  8. // swagger:route post /api/user/vip User GetApiUserVip
  9. //
  10. // Get user vip information | 获取用户VIP信息
  11. //
  12. // Get user vip information | 获取用户VIP信息
  13. //
  14. // Responses:
  15. // 200: UserVipResp
  16. func GetApiUserVipHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
  17. return func(w http.ResponseWriter, r *http.Request) {
  18. l := User.NewGetApiUserVipLogic(r.Context(), svcCtx)
  19. resp, err := l.GetApiUserVip()
  20. if err != nil {
  21. httpx.ErrorCtx(r.Context(), w, err)
  22. } else {
  23. httpx.OkJsonCtx(r.Context(), w, resp)
  24. }
  25. }
  26. }