|
@@ -303,6 +303,9 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
//重试避免人数过多频繁冲突
|
|
|
boolean flag = false;
|
|
|
for (int i = 1; i <= 100; i++) {
|
|
|
+ int max=10,min=1;
|
|
|
+ long ran2 = (long) (Math.random()*(max-min)+min);
|
|
|
+ Thread.sleep(ran2);
|
|
|
chargeInfo = sporadicChargeInfoDao.get(sporadicPayDto.getSporadicId());
|
|
|
if (chargeInfo.getMaxNum() <= chargeInfo.getPaidNum()) {
|
|
|
throw new BizException("活动人数暂时已满,请稍后再试");
|
|
@@ -314,10 +317,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
flag = true;
|
|
|
break;
|
|
|
}
|
|
|
-
|
|
|
- int max=100,min=1;
|
|
|
- long ran2 = (long) (Math.random()*(max-min)+min);
|
|
|
- Thread.sleep(ran2);
|
|
|
}
|
|
|
if (!flag) {
|
|
|
throw new BizException("活动火爆,请稍后再试");
|