1
This commit is contained in:
54
controllers/version_config_controller.go
Normal file
54
controllers/version_config_controller.go
Normal file
@@ -0,0 +1,54 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/app_version"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
type VersionController struct {
|
||||
web.Controller
|
||||
}
|
||||
|
||||
// @Title 添加小程序的版本控制
|
||||
// @Description 添加小程序的版本控制
|
||||
// @Param token header string true "认证token"
|
||||
// @Param appId header string true "小程序id"
|
||||
// @Param version header string true "小程序版本"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /AddVersionController [post]
|
||||
func (c *VersionController) AddVersionController() {
|
||||
c.callAddVersionController(func(params *tVersionAddVersionControllerParams) (interface{}, string, error) {
|
||||
err := app_version.AddApplicationVersion(params.Ctx.GetUserName(), params.AppId, params.Version)
|
||||
return nil, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 修改小程序的版本控制
|
||||
// @Description 修改小程序的版本控制
|
||||
// @Param token header string true "认证token"
|
||||
// @Param appId header string true "小程序id"
|
||||
// @Param version header string true "小程序版本"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /UpdateVersionController [post]
|
||||
func (c *VersionController) UpdateVersionController() {
|
||||
c.callUpdateVersionController(func(params *tVersionUpdateVersionControllerParams) (interface{}, string, error) {
|
||||
err := app_version.UpdateApplicationVersion(params.AppId, params.Version)
|
||||
return nil, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 获取版本控制
|
||||
// @Description 获取版本控制
|
||||
// @Param token header string false "认证token"
|
||||
// @Param appId header string false "小程序id"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetVersionController [get]
|
||||
func (c *VersionController) GetVersionController() {
|
||||
c.callGetVersionController(func(params *tVersionGetVersionControllerParams) (interface{}, string, error) {
|
||||
configs, err := app_version.GetApplicationVersion(params.AppId)
|
||||
return configs, "", err
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user