|
@@ -246,6 +246,7 @@ public class MemberRankSettingServiceImpl extends BaseServiceImpl<Integer, Membe
|
|
|
liveGoodsService.addGoodsStock(memberPayParamDto.getLiveGoodsId(),memberPayParamDto.getLiveId());
|
|
|
}
|
|
|
BigDecimal amount = BigDecimal.ZERO;
|
|
|
+ Integer activityId = null;
|
|
|
//判断当前商品是否可以购买(库存、上架状态、是否购买过)
|
|
|
//如果是云教练商品,那么只能购买一次、如果是免费直播课,那么每次上架只能买一次,总共只能买2次
|
|
|
if(memberPayParamDto.getLiveGoodsId() == 1){
|
|
@@ -256,7 +257,7 @@ public class MemberRankSettingServiceImpl extends BaseServiceImpl<Integer, Membe
|
|
|
throw new BizException("当前分部暂未开通活动");
|
|
|
}
|
|
|
//是否还有购买资格
|
|
|
- Integer activityId = Integer.parseInt(activityDto.getActivityId());
|
|
|
+ activityId = Integer.parseInt(activityDto.getActivityId());
|
|
|
VipGroupActivity vipGroupActivity = Optional.of(vipGroupActivityDao.get(activityId)).orElseThrow(()-> new BizException("活动不存在"));
|
|
|
if(vipGroupActivity.getStudentMaxUsedTimes() != -1){
|
|
|
//获取活动购买次数
|
|
@@ -301,6 +302,7 @@ public class MemberRankSettingServiceImpl extends BaseServiceImpl<Integer, Membe
|
|
|
studentPaymentOrder.setOrganId(sysUser.getOrganId());
|
|
|
studentPaymentOrder.setMemo("小小训练营云教练购买");
|
|
|
studentPaymentOrder.setGroupType(GroupType.ACTIVITY);
|
|
|
+ studentPaymentOrder.setActivityId(activityId.toString());
|
|
|
Map<String, Object> result = getMap(memberPayParamDto.getAmount(), memberPayParamDto.getUseBalancePayment(),studentPaymentOrder);
|
|
|
return BaseController.succeed(result);
|
|
|
}
|