Files
jx-callback/controllers/sys.go
gazebo 3b2a5d9b1c - eventhub
- sys/GetWXToken
2019-04-26 17:50:25 +08:00

32 lines
970 B
Go

package controllers
import (
"time"
"git.rosy.net.cn/jx-callback/globals"
"git.rosy.net.cn/jx-callback/business/jxutils/eventhub/syseventhub"
"github.com/astaxie/beego"
)
type SysController struct {
beego.Controller
}
// @Title 得到京西门店信息
// @Description 得到京西门店信息,如下条件之间是与的关系
// @Param accessKey query string true "假token"
// @Param oldToken query string true "之前的token"
// @Param waitSecond query int false "等待秒数"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /GetWXToken [get]
func (c *SysController) GetWXToken() {
c.callGetWXToken(func(params *tSysGetWXTokenParams) (retVal interface{}, errCode string, err error) {
if params.AccessKey == globals.GetWeixinTokenKey {
retVal = syseventhub.SysEventHub.GetWXToken(params.OldToken, time.Duration(params.WaitSecond)*time.Second)
}
return retVal, "", err
})
}