fix: resolve known issues and improve code standards

- Fix known bugs in user, plan, and server modules
- Standardize code formatting and structure
- Optimize database queries and model relationships
- Improve request validation and error handling
- Update admin controllers for better consistency
This commit is contained in:
xboard
2025-06-22 17:38:17 +08:00
parent 733cc7e9a5
commit 44d92ac1c6
20 changed files with 56 additions and 51 deletions
+2 -2
View File
@@ -53,10 +53,10 @@ class UserObserver
$nextResetTime = $this->trafficResetService->calculateNextResetTime($user);
if ($nextResetTime) {
$user->next_reset_at = $nextResetTime->timestamp;
$user->setAttribute('next_reset_at', $nextResetTime->timestamp);
} else {
// 如果计算结果为空,清除重置时间
$user->next_reset_at = null;
$user->setAttribute('next_reset_at', null);
}
} catch (\Exception $e) {