feat: 通用授权后台、离线证、Waffo 支付页与仪表盘加强
支持多产品计划展示、LICOFF 离线签发、支付独立配置与调试,以及分析看板;同步更新 README 与集成文档。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
0966375076
commit
8cc2c83f9d
41 files changed
+3177
-332
No files matched your search
@@ -75,7 +75,7 @@ func SetupRouter(db *gorm.DB, cfg *config.Config) *gin.Engine {
|
||||
authController := auth.NewAuthController(db, cfg)
|
||||
productController := product.NewProductController(db)
|
||||
customerController := customer.NewCustomerController(db)
|
||||
licenseController := license.NewLicenseController(db)
|
||||
licenseController := license.NewLicenseController(db, cfg)
|
||||
planController := plan.NewPlanController(db)
|
||||
orderController := order.NewOrderController(db)
|
||||
entitlementController := entitlement.NewEntitlementController(db)
|
||||
@@ -155,6 +155,8 @@ func SetupRouter(db *gorm.DB, cfg *config.Config) *gin.Engine {
|
||||
{
|
||||
register(licenses, "GET", "", licenseController.List)
|
||||
register(licenses, "POST", "", licenseController.Create)
|
||||
register(licenses, "POST", "/offline", licenseController.IssueOffline)
|
||||
register(licenses, "GET", "/offline/public-key", licenseController.OfflinePublicKey)
|
||||
register(licenses, "GET", "/export", licenseController.Export)
|
||||
register(licenses, "GET", "/:id", licenseController.Get)
|
||||
register(licenses, "PUT", "/:id", licenseController.Update)
|
||||
@@ -207,7 +209,10 @@ func SetupRouter(db *gorm.DB, cfg *config.Config) *gin.Engine {
|
||||
analyticsGroup := protected.Group("/analytics")
|
||||
{
|
||||
register(analyticsGroup, "GET", "/license-growth", analyticsController.GetLicenseGrowth)
|
||||
register(analyticsGroup, "GET", "/license-growth-detail", analyticsController.GetLicenseGrowthDetail)
|
||||
register(analyticsGroup, "GET", "/product-distribution", analyticsController.GetProductDistribution)
|
||||
register(analyticsGroup, "GET", "/geo-distribution", analyticsController.GetGeoDistribution)
|
||||
register(analyticsGroup, "GET", "/platform-distribution", analyticsController.GetPlatformDistribution)
|
||||
}
|
||||
|
||||
// 日志审计与系统设置
|
||||
@@ -221,10 +226,19 @@ func SetupRouter(db *gorm.DB, cfg *config.Config) *gin.Engine {
|
||||
{
|
||||
register(system, "GET", "", settingController.Get)
|
||||
register(system, "PUT", "", settingController.Update)
|
||||
register(system, "GET", "/waffo", settingController.GetWaffo)
|
||||
register(system, "PUT", "/waffo", settingController.UpdateWaffo)
|
||||
register(system, "POST", "/waffo/test", settingController.DebugWaffo)
|
||||
register(system, "GET", "/license-templates", settingController.ListLicenseTemplates)
|
||||
register(system, "POST", "/license-templates", settingController.SaveLicenseTemplate)
|
||||
register(system, "DELETE", "/license-templates/:id", settingController.DeleteLicenseTemplate)
|
||||
}
|
||||
|
||||
// 支付调试(与 settings/waffo/test 同一 handler) // Logan.Li
|
||||
paymentGroup := protected.Group("/payment")
|
||||
{
|
||||
register(paymentGroup, "POST", "/waffo/debug", settingController.DebugWaffo)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user