mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-23 19:37:35 +08:00
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:
@@ -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'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user