mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 07:50:25 +08:00 
			
		
		
		
	可以重置用户实名认证状态
This commit is contained in:
		@@ -132,6 +132,15 @@ func (this *UserIdentityDAO) CancelUserIdentity(tx *dbs.Tx, identityId int64) er
 | 
			
		||||
		UpdateQuickly()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ResetUserIdentity 重置实名认证状态
 | 
			
		||||
func (this *UserIdentityDAO) ResetUserIdentity(tx *dbs.Tx, identityId int64) error {
 | 
			
		||||
	return this.Query(tx).
 | 
			
		||||
		Pk(identityId).
 | 
			
		||||
		Set("status", userconfigs.UserIdentityStatusSubmitted).
 | 
			
		||||
		Set("updatedAt", time.Now().Unix()).
 | 
			
		||||
		UpdateQuickly()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// RejectUserIdentity 拒绝
 | 
			
		||||
func (this *UserIdentityDAO) RejectUserIdentity(tx *dbs.Tx, identityId int64, reason string) error {
 | 
			
		||||
	return this.Query(tx).
 | 
			
		||||
 
 | 
			
		||||
@@ -240,6 +240,23 @@ func (this *UserIdentityService) CancelUserIdentity(ctx context.Context, req *pb
 | 
			
		||||
	return this.Success()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ResetUserIdentity 重置提交身份审核认证信息
 | 
			
		||||
func (this *UserIdentityService) ResetUserIdentity(ctx context.Context, req *pb.ResetUserIdentityRequest) (*pb.RPCSuccess, error) {
 | 
			
		||||
	_, err := this.ValidateAdmin(ctx)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var tx = this.NullTx()
 | 
			
		||||
 | 
			
		||||
	err = models.SharedUserIdentityDAO.ResetUserIdentity(tx, req.UserIdentityId)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return this.Success()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// RejectUserIdentity 拒绝用户身份认证信息
 | 
			
		||||
func (this *UserIdentityService) RejectUserIdentity(ctx context.Context, req *pb.RejectUserIdentityRequest) (*pb.RPCSuccess, error) {
 | 
			
		||||
	_, err := this.ValidateAdmin(ctx)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user