feat: 添加租户创建功能,支持设置管理员及有效期,新增订单统计接口
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"quyun/v2/app/http/super/dto"
|
||||
"quyun/v2/app/requests"
|
||||
"quyun/v2/app/services"
|
||||
"quyun/v2/database/models"
|
||||
"quyun/v2/pkg/consts"
|
||||
|
||||
"github.com/gofiber/fiber/v3"
|
||||
@@ -28,6 +29,21 @@ func (*tenant) list(ctx fiber.Ctx, filter *dto.TenantFilter) (*requests.Pager, e
|
||||
return services.Tenant.Pager(ctx, filter)
|
||||
}
|
||||
|
||||
// create
|
||||
//
|
||||
// @Summary 创建租户并设置租户管理员
|
||||
// @Tags Super
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param form body dto.TenantCreateForm true "Form"
|
||||
// @Success 200 {object} models.Tenant
|
||||
//
|
||||
// @Router /super/v1/tenants [post]
|
||||
// @Bind form body
|
||||
func (*tenant) create(ctx fiber.Ctx, form *dto.TenantCreateForm) (*models.Tenant, error) {
|
||||
return services.Tenant.SuperCreateTenant(ctx, form)
|
||||
}
|
||||
|
||||
// updateExpire
|
||||
//
|
||||
// @Summary 更新过期时间
|
||||
|
||||
Reference in New Issue
Block a user