Browse Source

update

tmp
DengBiao 8 months ago
parent
commit
49349d0caf
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/db/db_user_identity.go

+ 2
- 2
app/db/db_user_identity.go View File

@@ -32,7 +32,7 @@ func (userIdentityDb *UserIdentityDb) GetUserIdentity(id int) (m *model.UserIden

func (userIdentityDb *UserIdentityDb) UserIdentityExist(enterpriseId int, idNo string, certType int) (m *model.UserIdentity, err error) {
m = new(model.UserIdentity)
has, err := userIdentityDb.Db.Where("enterprise_id =?", enterpriseId).And("id_no =?", idNo).And("cert_type =?", certType).Get(m)
has, err := userIdentityDb.Db.Where("enterprise_id =?", enterpriseId).And("state =?", enum.UserIdentityStateForNormal).And("id_no =?", idNo).And("cert_type =?", certType).Get(m)
if err != nil {
return nil, logx.Error(err)
}
@@ -44,7 +44,7 @@ func (userIdentityDb *UserIdentityDb) UserIdentityExist(enterpriseId int, idNo s

func (userIdentityDb *UserIdentityDb) UserIdentityExistV1(enterpriseId int, name string) (m *model.UserIdentity, err error) {
m = new(model.UserIdentity)
has, err := userIdentityDb.Db.Where("enterprise_id =?", enterpriseId).And("uid =?", userIdentityDb.Uid).And("name =?", name).Get(m)
has, err := userIdentityDb.Db.Where("enterprise_id =?", enterpriseId).And("state =?", enum.UserIdentityStateForNormal).And("uid =?", userIdentityDb.Uid).And("name =?", name).Get(m)
if err != nil {
return nil, logx.Error(err)
}


Loading…
Cancel
Save