|
@@ -70,7 +70,9 @@ public class PrizeController {
|
|
|
HashMap<String, Object> map = new HashMap<String, Object>();
|
|
|
// 模拟无限次数抽奖
|
|
|
// 测试必定中奖账号
|
|
|
-// if ("o1L3L5vwFkGSUMpec3uwRgsI6A-M".equals(user.getVoucherId())) {
|
|
|
+// if ("o1L3L5jybPQ0zJWujikHpVJPBiM8".equals(user.getVoucherId())) {
|
|
|
+// System.out.println("中奖了!!!!!!!!!!!!!!");
|
|
|
+// prizeRecordMapper.insert(prizeRecord);
|
|
|
// Prize prize = prizeMapper.selectByPrimaryKey(1);
|
|
|
// // UserPrizeCount userPrizeCount = new UserPrizeCount();
|
|
|
// // userPrizeCount.setUserId(userId);
|
|
@@ -88,7 +90,7 @@ public class PrizeController {
|
|
|
// 直接抽奖(每日默认2次抽奖机会)
|
|
|
synchronized (this) {
|
|
|
Random ran = new Random();
|
|
|
- int num = ran.nextInt(9999);
|
|
|
+ int num = ran.nextInt(60);
|
|
|
Prize prize = prizeMapper.selectByPrimaryKey(num);
|
|
|
if (prize == null) {
|
|
|
count = -1;
|
|
@@ -129,7 +131,7 @@ public class PrizeController {
|
|
|
// 已分享直接抽奖
|
|
|
synchronized (this) {
|
|
|
Random ran = new Random();
|
|
|
- int num = ran.nextInt(108);// 50%中奖概率
|
|
|
+ int num = ran.nextInt(60);// 50%中奖概率
|
|
|
Prize prize = prizeMapper.selectByPrimaryKey(num);
|
|
|
if (prize == null) {
|
|
|
count = -1;
|