|
@@ -155,10 +155,11 @@ public class TicketBoxServiceImpl extends ServiceImpl<TicketBoxMapper, TicketBox
|
|
|
if (ticketAwards.getQuantity() < pkgNum) {
|
|
|
// 奖级数量少于包数的,随机不重复分配,随机数从1开始
|
|
|
List<Integer> randomList = getRandomList(ticketAwards.getQuantity(), pkgNum);
|
|
|
+ LogUtil.debug(logger, "随机分配到的包序号为:{0}", new Object[]{JSONObject.toJSONString(randomList)});
|
|
|
for (Integer pkgId : randomList) {
|
|
|
pkgAwardsMap.get(pkgId).add(
|
|
|
new PkgAwards(ticketAwards.getAwardsId(), ticketAwards.getName(),
|
|
|
- ticketAwards.getSort(), ticketAwards.getQuantity()));
|
|
|
+ ticketAwards.getSort(), 1));
|
|
|
}
|
|
|
} else {
|
|
|
// 奖级数量大于包数的,平均分配,四舍五入
|