|
@@ -291,7 +291,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
if (chargeInfo.getOpenFlag().equals(1)) {
|
|
|
throw new BizException("项目已关闭");
|
|
|
}
|
|
|
- if(sporadicPayDto.getNum()==null){
|
|
|
+ if (sporadicPayDto.getNum() == null) {
|
|
|
sporadicPayDto.setNum(1);
|
|
|
}
|
|
|
BigDecimal amount = chargeInfo.getAmount().multiply(new BigDecimal(sporadicPayDto.getNum()));
|
|
@@ -302,7 +302,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
throw new BizException("订单金额异常");
|
|
|
}
|
|
|
if (chargeInfo.getMaxAmount() != null) {
|
|
|
- if(sporadicPayDto.getIsRepeatPay()){
|
|
|
+ if (sporadicPayDto.getIsRepeatPay()) {
|
|
|
List<StudentPaymentOrder> orders = studentPaymentOrderService.getUserOrderByType(sporadicPayDto.getUserId(), OrderTypeEnum.DOUBLE_ELEVEN2020, DealStatusEnum.ING);
|
|
|
for (StudentPaymentOrder order : orders) {
|
|
|
Map<String, String> notifyMap = new HashMap<>();
|
|
@@ -318,15 +318,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
if (chargeInfo.getOpenMaxTerm().equals(YesOrNoEnum.YES) && chargeInfo.getMaxAmount().compareTo(chargeInfo.getPaidAmount().add(amount)) < 0) {
|
|
|
throw new Exception("活动人数暂时已满,请稍后再试");
|
|
|
}
|
|
|
- List<SporadicChargeInfo> activeInfos = sporadicChargeInfoDao.getOrganActiveInfo(chargeInfo.getOrganId(), 12);
|
|
|
- for (SporadicChargeInfo activeInfo : activeInfos) {
|
|
|
- activeInfo.setPaidAmount(activeInfo.getPaidAmount().add(amount));
|
|
|
- activeInfo.setUpdateTime(new Date());
|
|
|
- int update = sporadicChargeInfoDao.update(activeInfo);
|
|
|
- if (update <= 0) {
|
|
|
- throw new BizException("活动火爆,请稍后再试");
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
OrderTypeEnum type = OrderTypeEnum.SPORADIC;
|