mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-09 03:30:24 +08:00
用户列表中显示实名审核状态
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user