|
@@ -301,11 +301,11 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
if (!(amount.compareTo(sporadicPayDto.getAmount()) == 0)) {
|
|
|
throw new BizException("订单金额异常");
|
|
|
}
|
|
|
- if (chargeInfo.getMaxNum() != null) {
|
|
|
- if (chargeInfo.getMaxNum() <= chargeInfo.getPaidNum()) {
|
|
|
+ if (chargeInfo.getMaxAmount() != null) {
|
|
|
+ if (chargeInfo.getOpenMaxTerm().equals(YesOrNoEnum.YES) && chargeInfo.getMaxAmount().compareTo(chargeInfo.getPaidAmount()) <= 0) {
|
|
|
throw new Exception("活动人数暂时已满,请稍后再试");
|
|
|
}
|
|
|
- chargeInfo.setPaidNum(chargeInfo.getPaidNum() + 1);
|
|
|
+ chargeInfo.setPaidAmount(chargeInfo.getPaidAmount().add(chargeInfo.getAmount()));
|
|
|
chargeInfo.setUpdateTime(new Date());
|
|
|
int update = sporadicChargeInfoDao.update(chargeInfo);
|
|
|
if (update <= 0) {
|