作者 yangfu

修改:用户中心注销登录

... ... @@ -279,7 +279,7 @@ func UCenterRevoke(header *protocol.RequestHeader, userId int64) (rsp *protocol.
transactionContext.RollbackTransaction()
}()
if user, err = UsersRepository.FindOne(map[string]interface{}{"id": userId}); err != nil {
if user, err = UsersRepository.FindOne(map[string]interface{}{"openId": userId}); err != nil {
log.Error(err)
err = nil
return
... ...
... ... @@ -50,6 +50,7 @@ func (repository *UsersRepository) FindOne(queryOptions map[string]interface{})
UsersModel := new(models.Users)
query := NewQuery(tx.Model(UsersModel), queryOptions)
query.SetWhere("id = ?", "id")
query.SetWhere("open_id = ?", "openId")
query.SetWhere("status = ?", "status")
query.SetWhere("phone = ?", "phone")
query.SetWhere("company_id = ?", "companyId")
... ...