feat: add user_list
This commit is contained in:
@@ -195,3 +195,21 @@ func (t *tenant) AddExpireDuration(ctx context.Context, tenantID int64, duration
|
||||
}
|
||||
return m.Save(ctx)
|
||||
}
|
||||
|
||||
// UpdateStatus
|
||||
func (t *tenant) UpdateStatus(ctx context.Context, tenantID int64, status consts.TenantStatus) error {
|
||||
logrus.WithField("tenant_id", tenantID).WithField("status", status).Info("update tenant status")
|
||||
|
||||
m, err := t.FindByID(ctx, tenantID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
m.Status = status
|
||||
_, err = m.Update(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user