Files
junhong_cmp_fiber/pkg/openapi/handlers.go
huang 80f560df33
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 6m17s
refactor(account): 统一账号管理API、完善权限检查和操作审计
- 合并 customer_account 和 shop_account 路由到统一的 account 接口
- 新增统一认证接口 (auth handler)
- 实现越权防护中间件和权限检查工具函数
- 新增操作审计日志模型和服务
- 更新数据库迁移 (版本 39: account_operation_log 表)
- 补充集成测试覆盖权限检查和审计日志场景
2026-02-02 17:23:20 +08:00

49 lines
2.6 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package openapi
import (
"github.com/break/junhong_cmp_fiber/internal/bootstrap"
"github.com/break/junhong_cmp_fiber/internal/handler/admin"
"github.com/break/junhong_cmp_fiber/internal/handler/app"
authHandler "github.com/break/junhong_cmp_fiber/internal/handler/auth"
"github.com/break/junhong_cmp_fiber/internal/handler/callback"
"github.com/break/junhong_cmp_fiber/internal/handler/h5"
)
// BuildDocHandlers 构造文档生成用的 handlers所有依赖传 nil
func BuildDocHandlers() *bootstrap.Handlers {
return &bootstrap.Handlers{
Auth: authHandler.NewHandler(nil, nil),
Account: admin.NewAccountHandler(nil),
Role: admin.NewRoleHandler(nil, nil),
Permission: admin.NewPermissionHandler(nil),
PersonalCustomer: app.NewPersonalCustomerHandler(nil, nil),
Shop: admin.NewShopHandler(nil),
ShopCommission: admin.NewShopCommissionHandler(nil),
CommissionWithdrawal: admin.NewCommissionWithdrawalHandler(nil),
CommissionWithdrawalSetting: admin.NewCommissionWithdrawalSettingHandler(nil),
Enterprise: admin.NewEnterpriseHandler(nil),
EnterpriseCard: admin.NewEnterpriseCardHandler(nil),
EnterpriseDevice: admin.NewEnterpriseDeviceHandler(nil),
EnterpriseDeviceH5: h5.NewEnterpriseDeviceHandler(nil),
Authorization: admin.NewAuthorizationHandler(nil),
MyCommission: admin.NewMyCommissionHandler(nil),
IotCard: admin.NewIotCardHandler(nil),
IotCardImport: admin.NewIotCardImportHandler(nil),
Device: admin.NewDeviceHandler(nil),
DeviceImport: admin.NewDeviceImportHandler(nil),
AssetAllocationRecord: admin.NewAssetAllocationRecordHandler(nil),
Storage: admin.NewStorageHandler(nil),
Carrier: admin.NewCarrierHandler(nil),
PackageSeries: admin.NewPackageSeriesHandler(nil),
Package: admin.NewPackageHandler(nil),
ShopSeriesAllocation: admin.NewShopSeriesAllocationHandler(nil),
ShopPackageAllocation: admin.NewShopPackageAllocationHandler(nil),
ShopPackageBatchAllocation: admin.NewShopPackageBatchAllocationHandler(nil),
ShopPackageBatchPricing: admin.NewShopPackageBatchPricingHandler(nil),
AdminOrder: admin.NewOrderHandler(nil),
H5Order: h5.NewOrderHandler(nil),
H5Recharge: h5.NewRechargeHandler(nil),
PaymentCallback: callback.NewPaymentHandler(nil, nil, nil),
}
}