# 红包来啦demo **Repository Path**: chimmhuang/red-packet-demo ## Basic Information - **Project Name**: 红包来啦demo - **Description**: No description available - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-04-21 - **Last Updated**: 2021-05-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 抢红包的两种方式 方式一:将红包保存在 redis 中,然后每个人拿到红包信息之后,再根据二倍均值算法拿到具体的金额。 方式二:将红包按照二倍均值算法,根据要发放的数量拆分好再放入 redis 中,然后每个人通过 redis 的 pop 方式取出具体的金额。