user.go 787 字节
package v1

import (
	"gitlab.fjmaimaimai.com/mmm-go/gocomm/pkg/mybeego"
)

type UserController struct {
	mybeego.BaseController
}

//匹配的是路由
// 127.0.0.1:8080/user/login/*
//127.0.0.1:8080/user/logout/*

func (this *UserController) URLMapping() {
	//this.Mapping("/v1/user/login",this.Login)
	//this.Mapping("/v1/user/select",this.SelectUser)
}

// Login
// @Title Login
// @Description 登录
// @Param body body string true "body"
// @router /v1/user/login [post]
func (this *UserController) Login() {
	var msg *mybeego.Message
	defer func() {
		this.Resp(msg)
	}()
	msg = mybeego.NewErrMessage(0, "login success")
}

func (this *UserController) Logout() {
	var msg *mybeego.Message
	defer func() {
		this.Resp(msg)
	}()
	msg = mybeego.NewErrMessage(0, "logout success")
}