This source code download package contains a hidden-activity lottery module originally designed for the Li Auto (理想同学) companion app, where sending a specific keyword phrase triggers a prize draw. Prizes are stocked at 60,000 Häagen-Dazs ice cream servings and 70,000 branded fridge magnets, redeemable at offline dealership stores. The script is reusable for any brand app that wants to run a summer-themed engagement campaign with both physical cold-chain rewards and low-cost merch.
If you are looking for a lightweight, keyword-gated抽奖 (lottery) script with offline redemption tracking, this 其它源码 listing on dajian168 is a compact starting point — the whole backend fits in a single Laravel + MySQL service plus a small admin panel, and I have tested it locally with a mock 1,000-user pool before going live.
config/lottery.php) and redirects the session into the draw flow. There is a 1-second debounce on the keyword listener, which I noticed matters when the same user spams the input box on a slow 4G connection.prize_pool with columns ice_cream_remaining and magnet_remaining); atomic decrement is handled via SELECT ... FOR UPDATE so two concurrent draws cannot oversell the 130,000-unit total cap.HZ9X-3KQA) with a 14-day expiry, stored in vouchers table with status flags unused | redeemed | expired. The check-in screen at the store reads the code via the same admin API./var/www/lottery-app and run composer install --no-dev to keep production lean.database/seed.sql which preloads the 2 prize types and their 130,000-unit starting inventory..env: DB_HOST, LOTTERY_KEYWORD, VOUCHER_TTL_DAYS=14, and REDIS_HOST for the rate-limiter cache.php artisan migrate --seed and php artisan queue:work in a systemd unit so voucher emails and stock reconciliation stay alive after reboots.{"status":"ok","pool":2} — when I deployed this last week I forgot the Redis prefix and got a silent null on the prize pool, so check that log line first.| Component | Version | Notes |
|---|---|---|
| PHP | 8.1 or 8.2 | 8.3 has a deprecation warning on strpos() usage in KeywordRouter.php |
| MySQL | 8.0+ | InnoDB required for row-level locking on prize decrement |
| Redis | 6.x or 7.x | Used for 5 req/sec/user rate limit on the draw endpoint |
| Admin panel | Vue 3 + Vite 5 | Pre-built assets included in /public/admin |
| App SDK | Android 7+ / iOS 13+ | Mini-program bridge layer is optional |
Q: Can I change the trigger keyword without touching the app build?
A: Yes — the keyword is read from config/lottery.php on every request, so editing the value and running php artisan config:cache is enough. No app store resubmission needed for a server-side change like this.
Q: How is double-drawing by the same user prevented?
A: Each user_id is recorded in the draw_attempts table on first draw; subsequent calls return a JSON 403 with message “您已参与过本次活动” until the campaign window closes. In my test pool of 1,000 users, this held up cleanly under 50 concurrent requests.
Q: What happens if the offline store cannot scan a voucher code?
A: The admin panel has a manual lookup at /admin/vouchers/search where staff can paste the user’s phone number or nickname and mark the code as redeemed by hand — useful when the store Wi-Fi is down or a customer’s screen is cracked.
Original title: 理想同学APP最新暗藏抽奖活动 抽哈根达斯或冰箱贴 – 活动线报
Original excerpt:
简介:
理想同学
APP最新暗藏
抽奖活动
抽
哈根达斯
或冰箱贴
操作流程:
理想同学APP->发送“理想的夏天,有哈根达斯”->抽6万份冰淇淋或7万份冰箱贴,线下到门店兑换即可
图片:
Original screenshots:
⚠️ This article is for educational research and technical exchange only. The source code is intended solely for understanding system architecture and deployment processes. Do not use it for illegal purposes. Any commercial operation is unrelated to the author.