user.go 682 字节
package controllers

import (
	"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/appsvr/protocol"
	"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/appsvr/services/user"
)

type UserController struct {
	BaseController
}

//UserInfo
//@router /userInfo [post]
func (this *UserController) UserInfo() {
	var msg *protocol.ResponseMessage
	defer func() {
		this.Resp(msg)
	}()
	var request *protocol.UserInfoRequest
	if err := this.JsonUnmarshal(&request); err != nil {
		msg = protocol.BadRequestParam(1)
		return
	}
	if b, m := this.Valid(request); !b {
		msg = m
		return
	}
	header := this.GetRequestHeader(this.Ctx)
	msg = protocol.NewReturnResponse(user.UserInfo(header, request))
}