初始化

This commit is contained in:
2026-07-18 05:58:41 +08:00
commit e4b95eb05e
69 changed files with 2289 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
package pricing
// ControllerV1 是套餐定价控制器。
type ControllerV1 struct{}
// NewV1 创建套餐定价控制器实例。
func NewV1() *ControllerV1 {
return &ControllerV1{}
}

View File

@@ -0,0 +1,21 @@
package pricing
import (
"context"
"xk-of-api/api/pricing/v1"
"xk-of-api/internal/response"
"xk-of-api/internal/service"
)
// Plans 获取官网可展示套餐。
func (c *ControllerV1) Plans(ctx context.Context, req *v1.PlansReq) (res *v1.PlansRes, err error) {
response.Success(ctx, service.Pricing.Plans())
return nil, nil
}
// AdminPlans 获取后台套餐列表。
func (c *ControllerV1) AdminPlans(ctx context.Context, req *v1.AdminPlansReq) (res *v1.AdminPlansRes, err error) {
response.Success(ctx, service.Pricing.Plans())
return nil, nil
}