123456789101112131415161718192021222324 |
- package models
- import (
- "github.com/beego/beego/v2/client/orm"
- )
- type WxToken struct {
- id int
- AccessToken string
- ExpiresIn int64
- }
- func GetWxTokenById() (token WxToken, err error) {
- o := orm.NewOrm()
- sql := "select * from wx_token"
- err = o.Raw(sql).QueryRow(&token)
- return
- }
- func (w *WxToken) Update(columns []string) (err error) {
- o := orm.NewOrm()
- _, err = o.Update(w, columns...)
- return
- }
|