用户列表中显示实名审核状态

This commit is contained in:
刘祥超
2022-07-24 11:57:42 +08:00
parent 6a525c2b82
commit bddb3cae96
5 changed files with 87 additions and 59 deletions

View File

@@ -146,7 +146,7 @@ func (this *UserIdentityDAO) RejectUserIdentity(tx *dbs.Tx, identityId int64, re
return this.Query(tx).
Pk(identityId).
Set("status", userconfigs.UserIdentityStatusRejected).
Set("rejectedReason", reason).
Set("rejectReason", reason).
Set("rejectedAt", time.Now().Unix()).
UpdateQuickly()
}
@@ -207,3 +207,12 @@ func (this *UserIdentityDAO) CheckUserIdentityIsVerified(tx *dbs.Tx, userId int6
State(UserIdentityStateEnabled).
Exist()
}
// CheckUserIdentityStatus 检查状态
func (this *UserIdentityDAO) CheckUserIdentityStatus(tx *dbs.Tx, userId int64, status userconfigs.UserIdentityStatus) (bool, error) {
return this.Query(tx).
Attr("userId", userId).
Attr("status", status).
State(UserIdentityStateEnabled).
Exist()
}