|
@@ -44,6 +44,7 @@ type WxUser struct {
|
|
|
LoginTime time.Time `description:"最近一次登录时间"`
|
|
|
SessionKey string `description:"微信小程序会话密钥"`
|
|
|
IsRegister int `description:"是否注册:1:已注册,0:未注册"`
|
|
|
+ Source int `description:"绑定来源,1:微信端,2:pc网页端,3:查研观向小程序,4:每日咨询"`
|
|
|
}
|
|
|
|
|
|
//添加用户信息
|
|
@@ -72,6 +73,8 @@ type WxUserItem struct {
|
|
|
LastUpdatedTime time.Time `description:"最近一次修改时间"`
|
|
|
SessionKey string `description:"微信小程序会话密钥"`
|
|
|
CompanyName string `description:"公司名称"`
|
|
|
+ IsRegister int `description:"是否注册:1:已注册,0:未注册"`
|
|
|
+ Source int
|
|
|
}
|
|
|
|
|
|
func GetWxUserItemByUnionid(unionid string) (item *WxUserItem, err error) {
|
|
@@ -197,7 +200,7 @@ func ModifyReportLastViewTime(uid int) (err error) {
|
|
|
//变更联系人是否已注册状态
|
|
|
func ModifyWxUserRegisterStatus(userId int) (err error) {
|
|
|
o := orm.NewOrm()
|
|
|
- sql := `UPDATE wx_user SET is_register=?,register_time=NOW() WHERE user_id = ? `
|
|
|
+ sql := `UPDATE wx_user SET is_register=?,source=3,register_time=NOW() WHERE user_id = ? `
|
|
|
_, err = o.Raw(sql, 1, userId).Exec()
|
|
|
return
|
|
|
-}
|
|
|
+}
|