controllers

package
v0.0.0-...-1bcd10a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressController

type AddressController struct {
	beego.Controller
}

func (*AddressController) CreateAddress

func (addr *AddressController) CreateAddress()

@Title Create Address @Description Create user address @Param contact body string true "Address contact" @Param telephone body string true "Address telephone" @Param isDefault body bool true "Address isDefault" @Param country body string true "Address country" @Param provinceCity body string true "Address provinceCity" @Param details body string true "Address details" @Param userId body uint64 true "Address userId" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /create [post]

func (*AddressController) DeleteAddress

func (addr *AddressController) DeleteAddress()

@Title Delete Address Details @Description Delete user address details @Param contact body string true "Address contact" @Param telephone body string true "Address telephone" @Param isDefault body bool true "Address isDefault" @Param country body string true "Address country" @Param provinceCity body string true "Address provinceCity" @Param details body string true "Address details" @Param userId body uint64 true "Address userId" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /delete [delete]

func (*AddressController) QueryAddresses

func (addr *AddressController) QueryAddresses()

@Title Query Address @Description Query user address list @Param userId body float64 true "User Id" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /list [post]

func (*AddressController) QueryDetails

func (addr *AddressController) QueryDetails()

@Title Query Address Details @Description Query user address details @Param userId body float64 true "user id" @Param addressId body float64 true "address id" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /details [post]

func (*AddressController) SetAsDefaultAddress

func (addr *AddressController) SetAsDefaultAddress()

@Title Set As Default Address @Description Set user default address @Param userId body float64 true "userId" @Param addressId body float64 true "addressId" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /delete [put]

func (*AddressController) UpdateAddress

func (addr *AddressController) UpdateAddress()

@Title Update Address Details @Description Update user address details @Param models.AddressDTO body object true "Create a new address" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /update [put]

type AdvertController

type AdvertController struct {
	beego.Controller
}

func (*AdvertController) GetAdvertList

func (adv *AdvertController) GetAdvertList()

@Title Advert List @Description Get advert list @Failure 200400 {object} models.ResponseModel @Success 200000 {object} models.ResponseModel @router /list [get]

func (*AdvertController) InsertAdvert

func (adv *AdvertController) InsertAdvert()

@Title Advert Insert @Description Insert a new advert @Param advertUrl body string true "advert url" @Param relativeId body float64 false "advert relate to" @Param remark body string false "advert remark" @Failure 200400 {object} models.ResponseModel @Success 200000 {object} models.ResponseModel @router /insert [post]

func (*AdvertController) UpdateAdvert

func (adv *AdvertController) UpdateAdvert()

@Title Advert Update @Description Update a advert @Param advertId body float64 true "advert id" @Param advertUrl body string true "advert url" @Param relativeId body float64 false "advert relate to" @Param remark body string false "advert remark" @Failure 200400 {object} models.ResponseModel @Success 200000 {object} models.ResponseModel @router /update [put]

type ClassifyController

type ClassifyController struct {
	beego.Controller
}

func (*ClassifyController) CreateCategory

func (cls *ClassifyController) CreateCategory()

@Title Create Category @Description Create a new category @Param categoryName body string true "Category name" @Param categoryIcon body string true "Category icon" @Param categoryPriority body string true "Category priority, default is '1'" @Param classifyId body string true "Classify's id" @Param status body string false "Category status, default is 'active'" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /category/create [post]

func (*ClassifyController) CreateClassify

func (cls *ClassifyController) CreateClassify()

@Title Create Classify @Description Create a new classify @Param classifyName body string true "Classify name" @Param classifyIcon body string true "Classify icon" @Param classifyPriority body int false "Classify priority, default is 1" @Param status body string false "Classify status, default is 'active'" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /create [post]

func (*ClassifyController) QueryClassifies

func (cls *ClassifyController) QueryClassifies()

@Title Classify @Description Query classifies information @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /list [get]

type MainController

type MainController struct {
	beego.Controller
}

func (*MainController) Get

func (c *MainController) Get()

type OrderController

type OrderController struct {
	beego.Controller
}

func (*OrderController) OrderCancel

func (or *OrderController) OrderCancel()

@Title OrderCancel @Description Cancel the order @Param userId body float64 true "User Id" @Param orderId body float64 true "Order Id" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /cancel [put]

func (*OrderController) OrderCompleted

func (or *OrderController) OrderCompleted()

@Title OrderCompleted @Description Order is already completed @Param userId body float64 true "User Id" @Param orderId body float64 true "Order Id" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /completed [put]

func (*OrderController) PlaceOrder

func (or *OrderController) PlaceOrder()

@Title PlaceOrder @Description Place a new order @Param userId body float64 true "User Id" @Param addressId body float64 true "Address Id" @Param orders body interface true "Order array details" @Param discount body string false "Total discount" @Param remark body string false "Order remark" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /place [post]

func (*OrderController) QueryOrders

func (or *OrderController) QueryOrders()

@Title Order List @Description Query user all order records @Param userId body float64 true "User Id" @Param orderType body string true "Order type, default is 'all'" @Param pageIndex body uint false "Page index, default is: 1" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /list [post]

func (*OrderController) QueryProductDetails

func (or *OrderController) QueryProductDetails()

@Title QueryProductDetails @Description Query the order's detail information @Param userId body float64 true "User Id" @Param orderId body float64 true "Order Id" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /details [post]

type ProductController

type ProductController struct {
	beego.Controller
}

func (*ProductController) InsertMultipleProducts

func (pd *ProductController) InsertMultipleProducts()

func (*ProductController) InsertProduct

func (pd *ProductController) InsertProduct()

func (*ProductController) QueryProductDetails

func (pd *ProductController) QueryProductDetails()

@Title Product - details @Description Query product details @Params productId body float64 true "Product id" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /recommend [post]

func (*ProductController) QueryProducts

func (pd *ProductController) QueryProducts()

@Title Product list @Description Query product list by product type. @Params productType body true "Product type, default is 'recommend'" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /recommend [get]

func (*ProductController) QuerySpecificationDetails

func (pd *ProductController) QuerySpecificationDetails()

@Title Product - Specification details @Description Query product specification details @Params inventoryId body float64 true "Inventory's id" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /recommend [post]

type SMSController

type SMSController struct {
	beego.Controller
}

func (*SMSController) ObtainSecurityCode

func (s *SMSController) ObtainSecurityCode()

func (*SMSController) VerifySecurityCode

func (s *SMSController) VerifySecurityCode()

type UserController

type UserController struct {
	beego.Controller
}

func (*UserController) LoginByTelephone

func (u *UserController) LoginByTelephone()

@Title Login @Description User login api @Param telephone body string true "Login by telephone" @Param password body string true "User password, length need to more then 6" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /loginByTelephone [post]

func (*UserController) LoginByWechat

func (u *UserController) LoginByWechat()

@Title LoginByWechat @Description User use wechat login api @Param jsCode body string true "User's wechat 'jsCode'" @Param userInfo body string true "User's wechat base profile" @Param invitationCode body string false "Invitation code" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /loginByWechat [post]

func (*UserController) QueryUserTeams

func (u *UserController) QueryUserTeams()

@Title Query User Teams @Description Query user's team information @Param userId body float64 true "User's Id" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /teams [post]

func (*UserController) Register

func (u *UserController) Register()

@Title Register @Description User register api by telephone @Param telephone body string true "Register by cellphone" @Param username body string false "User's username" @Param password body string true "User password, length need to more then 6" @Param nickname body string true "User nickname" @Param signature body string false "User signature" @Param male body bool false "Male/Female" @Param invitationCode query string true "User's agent invitation code" @Success 200000 {object} models.ResponseModel @Failure 200400 {object} models.ResponseModel @router /register [post]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL