作者 yangfu

login fix

@@ -164,7 +164,7 @@ func DeleteUsers(id int64) (err error) { @@ -164,7 +164,7 @@ func DeleteUsers(id int64) (err error) {
164 164
165 func GetUserKefu() (v []*User, err error) { 165 func GetUserKefu() (v []*User, err error) {
166 o := orm.NewOrm() 166 o := orm.NewOrm()
167 - sql := `select * from user where is_kefu = 1` 167 + sql := `select * from user where is_kefu = 1 and enable_status=1`
168 if _, err = o.Raw(sql).QueryRows(&v); err == nil { 168 if _, err = o.Raw(sql).QueryRows(&v); err == nil {
169 return v, nil 169 return v, nil
170 } 170 }
@@ -173,7 +173,7 @@ func GetUserKefu() (v []*User, err error) { @@ -173,7 +173,7 @@ func GetUserKefu() (v []*User, err error) {
173 173
174 func GetUserByMobile(mobile string) (v *User, err error) { 174 func GetUserByMobile(mobile string) (v *User, err error) {
175 o := orm.NewOrm() 175 o := orm.NewOrm()
176 - sql := "select * from user where phone=?" 176 + sql := "select * from user where phone=? and enable_status=1"
177 if err = o.Raw(sql, mobile).QueryRow(&v); err == nil { 177 if err = o.Raw(sql, mobile).QueryRow(&v); err == nil {
178 return v, nil 178 return v, nil
179 } 179 }