12345678910111213141516171819202122232425 |
- package custom
- import "github.com/beego/beego/v2/client/orm"
- type WechatSign struct {
- AppId string
- NonceStr string
- Timestamp int64
- Url string
- Signature string
- RawString string
- }
- type WxTicket struct {
- Errcode int `json:"errcode"`
- Errmsg string `json:"errmsg"`
- Ticket string `json:"ticket"`
- }
- func ModifyWxUserInfo(nickName, headimgUrl, city, province, country string, sex, userId int) (err error) {
- o := orm.NewOrm()
- sql := `UPDATE wx_user SET nick_name=?,headimgurl=?,sex=?,city=?,province=?,country=? WHERE user_id=? `
- _, err = o.Raw(sql, nickName, headimgUrl, sex, city, province, country, userId).Exec()
- return
- }
|