feat: enhance user management and system optimization

New Features:
- Add bulk ban and email notification in user management
- Add CSV export for batch coupon generation
- Optimize subscription description template

Bug Fixes:
- Fix knowledge base pagination issue
- Fix permission group filtering in node management
- Fix unauthorized order placement for free subscription periods
This commit is contained in:
xboard
2025-02-09 11:06:08 +08:00
parent 8e5732d857
commit 1b728fffc7
13 changed files with 218 additions and 33 deletions
+6 -5
View File
@@ -75,16 +75,17 @@ class PlanService
// 转换周期格式为新版格式
$periodKey = self::getPeriodKey($period);
// 检查价格时使用新版格式
if (!isset($this->plan->prices[$periodKey]) || $this->plan->prices[$periodKey] === NULL) {
throw new ApiException(__('This payment period cannot be purchased, please choose another period'));
}
if ($periodKey === Plan::PERIOD_RESET_TRAFFIC) {
$this->validateResetTrafficPurchase($user);
return;
}
// 检查价格时使用新版格式
if (!isset($this->plan->prices[$periodKey])) {
throw new ApiException(__('This payment period cannot be purchased, please choose another period'));
}
if ($user->plan_id !== $this->plan->id && !$this->hasCapacity($this->plan)) {
throw new ApiException(__('Current product is sold out'));
}