user.go 815 字节
package v1

import (
	"ability/protocol"

	"ability/controllers"
)

type UserController struct {
	controllers.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 *protocol.ResponseMessage
	defer func() {
		this.Resp(msg)
	}()
	msg = protocol.NewReturnResponse("login success", nil)
}

func (this *UserController) Logout() {
	var msg *protocol.ResponseMessage
	defer func() {
		this.Resp(msg)
	}()
	msg = protocol.NewReturnResponse("logout success", nil)
}