seed bonus add log etc

This commit is contained in:
xiaomlove
2025-09-08 03:05:55 +07:00
parent ae08039323
commit 60b5aba518
53 changed files with 720 additions and 131 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Repositories;
use App\Enums\ModelEventEnum;
use App\Enums\RedisKeysEnum;
use App\Exceptions\InsufficientPermissionException;
use App\Exceptions\NexusException;
use App\Http\Resources\ExamUserResource;
@@ -252,9 +253,15 @@ class UserRepository extends BaseRepository
do_log("user: $uid, $modCommentText, update: " . nexus_json_encode($update));
$this->clearCache($targetUser);
fire_event("user_enabled", $targetUser);
$this->setEnableLatelyCache($targetUser->id);
return true;
}
private function setEnableLatelyCache(int $userId): void
{
NexusDB::cache_put(User::getUserEnableLatelyCacheKey($userId), now()->toDateTimeString());
}
public function getInviteInfo($id)
{
$user = User::query()->findOrFail($id, ['id']);