|
@@ -302,7 +302,7 @@ public class TicketBoxServiceImpl extends ServiceImpl<TicketBoxMapper, TicketBox
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 从total中随机取n个不重复的数
|
|
|
|
|
|
+ * 从total中随机取n个不重复的数,范围[1, total]
|
|
*
|
|
*
|
|
* @param n
|
|
* @param n
|
|
* @param total
|
|
* @param total
|
|
@@ -313,7 +313,7 @@ public class TicketBoxServiceImpl extends ServiceImpl<TicketBoxMapper, TicketBox
|
|
Random rand = new Random();
|
|
Random rand = new Random();
|
|
boolean[] bool = new boolean[total];
|
|
boolean[] bool = new boolean[total];
|
|
for (Integer exInt : excludeList) {
|
|
for (Integer exInt : excludeList) {
|
|
- bool[exInt] = true;
|
|
|
|
|
|
+ bool[exInt-1] = true;
|
|
}
|
|
}
|
|
int randInt = 0;
|
|
int randInt = 0;
|
|
for (int i = 0; i < n; i++) {
|
|
for (int i = 0; i < n; i++) {
|