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
+17
-17
@@ -114,7 +114,19 @@ func seedSampleData(db *gorm.DB) error {
|
||||
plans := []model.Plan{
|
||||
{
|
||||
ProductID: product.ID,
|
||||
Name: "Yearly",
|
||||
Name: "体验",
|
||||
PlanType: "trial",
|
||||
Price: 0,
|
||||
Currency: "CNY",
|
||||
Duration: 180,
|
||||
MaxDevices: 1,
|
||||
Features: `["专业功能","体验","1 设备"]`,
|
||||
SortOrder: 0,
|
||||
Status: 1,
|
||||
},
|
||||
{
|
||||
ProductID: product.ID,
|
||||
Name: "包年",
|
||||
PlanType: "yearly",
|
||||
Price: 99,
|
||||
Currency: "CNY",
|
||||
@@ -126,7 +138,7 @@ func seedSampleData(db *gorm.DB) error {
|
||||
},
|
||||
{
|
||||
ProductID: product.ID,
|
||||
Name: "Perpetual",
|
||||
Name: "永久",
|
||||
PlanType: "perpetual",
|
||||
Price: 199,
|
||||
Currency: "CNY",
|
||||
@@ -136,18 +148,6 @@ func seedSampleData(db *gorm.DB) error {
|
||||
SortOrder: 2,
|
||||
Status: 1,
|
||||
},
|
||||
{
|
||||
ProductID: product.ID,
|
||||
Name: "Trial 180d",
|
||||
PlanType: "trial",
|
||||
Price: 0,
|
||||
Currency: "USD",
|
||||
Duration: 180,
|
||||
MaxDevices: 1,
|
||||
Features: `["专业功能","半年体验","1 设备"]`,
|
||||
SortOrder: 0,
|
||||
Status: 1,
|
||||
},
|
||||
}
|
||||
for i := range plans {
|
||||
if err := db.Create(&plans[i]).Error; err != nil {
|
||||
@@ -232,9 +232,9 @@ func ensureOpsXShellPlanPricing(db *gorm.DB) error {
|
||||
sortOrder int
|
||||
}
|
||||
updates := []planSpec{
|
||||
{"yearly", "Yearly", 99, "CNY", 365, 2, "[\"专业功能\",\"包年\",\"2 设备\"]", 1},
|
||||
{"perpetual", "Perpetual", 199, "CNY", 0, 5, "[\"专业功能\",\"永久授权\",\"5 设备\"]", 2},
|
||||
{"trial", "Trial 180d", 0, "CNY", 180, 1, "[\"专业功能\",\"半年体验\",\"1 设备\"]", 0},
|
||||
{"trial", "体验", 0, "CNY", 180, 1, "[\"专业功能\",\"体验\",\"1 设备\"]", 0},
|
||||
{"yearly", "包年", 99, "CNY", 365, 2, "[\"专业功能\",\"包年\",\"2 设备\"]", 1},
|
||||
{"perpetual", "永久", 199, "CNY", 0, 5, "[\"专业功能\",\"永久授权\",\"5 设备\"]", 2},
|
||||
}
|
||||
for _, u := range updates {
|
||||
var plan model.Plan
|
||||
|
||||
Reference in new issue
Block a user