This project is the backend section of QuickReview. It implements multiple modules such as SMS login, store review, coupon seckill, daily check-in, friend follow-up, fan follow-up blogger, and actively pushes related blogs of bloggers.
Users can browse recommended content on the homepage, search for nearby merchants, view merchant details and reviews, and post exploration blogs, and purchase limited-time seckill products released by merchants.
- MvcConfig: Configures interceptors for login and automatic login token refresh.
- MybatisConfig: Configures MyBatis Plus pagination plugin.
- RedissonConfig: Creates a singleton Redisson client.
- WebExceptionAdvice: Global response interceptor.
entity Directory: Stores Java POJOs corresponding to the database, typically auto-generated by plugins like MyBatisX.
- BlogServiceImpl: Implements like functionality and time-sorted like rankings using Redis; implements pull-based feed streams using Redis.
- FollowServiceImpl: Implements follow and mutual follow using Redis sets.
- ShopServiceImpl: Optimizes shop query performance using Redis caching; sorts nearby shops by distance using Redis GEO.
- UserServiceImpl: Implements SMS login using Redis (distributed session), with verification codes printed in logs.
- VoucherOrderServiceImpl: Implements flash sales and single-order-per-person functionality using Redis distributed lock, Redis + Lua, and message queues.
- VoucherServiceImpl: Adds vouchers and stores stock in Redis in preparation for flash sales.
- CacheClient: Encapsulates general caching utility classes, involving generics and functional programming.
- RedisConstants: Stores Redis keys, expiration times, and other constants used in the project.
- RedisIdWorker: Implements a globally unique incremental ID generator based on Redis.
- RedisTokenInterceptor: Automatically refreshes Redis login token validity.
- SimpleRedisLock: Simple Redis lock implementation, generally replaced by Redisson.
- UserHolder: Caches user information within a thread.
This part is done by my teammate using Vue2, Element UI, Axios, HTML and CSS, and deployed using Nginx.
-
Configurations regarding to databases can be modified at
QuickReview\src\main\resources\application.yaml. -
The GEOSEARCH command for getting nearby merchant information was introduced in Redis 6.2, so the Redis server version cannot be lower than 6.2.
| Technology | Description |
|---|---|
| SpringBoot | Container+MVC framework |
| Redis | Distributed cache |
| Redis Stream | Message middleware |
| MySQL | Relational database |
| Lombok | Simplified object encapsulation tool |