|
@@ -3,8 +3,8 @@ package com.ym.mec.biz.service.impl;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
-import org.apache.commons.lang.StringUtils;
|
|
|
-import org.apache.commons.lang.math.RandomUtils;
|
|
|
+import org.apache.commons.lang3.RandomUtils;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
@@ -93,7 +93,7 @@ public class LuckDrawPrizeServiceImpl extends BaseServiceImpl<Integer, LuckDrawP
|
|
|
// 抽奖逻辑
|
|
|
List<LuckDrawPrize> luckDraws = luckDrawPrizeDao.queryEnabledList(group);
|
|
|
if (luckDraws != null) {
|
|
|
- int randomNum = RandomUtils.nextInt(DRAW_BASE_NUMBER);
|
|
|
+ int randomNum = RandomUtils.nextInt(0, DRAW_BASE_NUMBER);
|
|
|
double start = 0;
|
|
|
double chances = 0;
|
|
|
for (LuckDrawPrize luckDraw : luckDraws) {
|