|
@@ -105,11 +105,12 @@ public class MemberPriceSettingsServiceImpl extends ServiceImpl<MemberPriceSetti
|
|
|
return HttpResponseResult.failed("产品信息已更新,请重新选择");
|
|
|
}
|
|
|
|
|
|
+
|
|
|
// 判断是否有待支付订单 如果有返回不可下单
|
|
|
checkOrder(orderReqInfo.getOrderClient(), orderReqInfo.getOrderType().name(), orderReqInfo.getUserId());
|
|
|
|
|
|
|
|
|
- checkVip(detail, orderReqInfo.getVipEndDays(), orderReqInfo.getUserId(), orderReqInfo.getOrderClient(), orderReqInfo.getGoodsNum());
|
|
|
+ checkVip(detail, orderReqInfo.getVipEndDays(), orderReqInfo.getUserId(), orderReqInfo.getOrderClient(), orderReqInfo.getGoodsNum(),orderReqInfo.getBizPrice());
|
|
|
|
|
|
OrderCreateRes orderCreateRes = new OrderCreateRes();
|
|
|
BigDecimal couponAmount = BigDecimal.ZERO;
|
|
@@ -142,7 +143,7 @@ public class MemberPriceSettingsServiceImpl extends ServiceImpl<MemberPriceSetti
|
|
|
return HttpResponseResult.succeed(orderCreateRes);
|
|
|
}
|
|
|
|
|
|
- private void checkVip(MemberPriceSettingsVo detail, Integer vipDays, Long userId, ClientEnum client, Integer num) {
|
|
|
+ private void checkVip(MemberPriceSettingsVo detail, Integer vipDays, Long userId, ClientEnum client, Integer num, BigDecimal bizPrice) {
|
|
|
// 判断会员剩余天数是否改变
|
|
|
if (detail.getVipType() == EVipType.SVIP && vipDays != null && vipDays > 0) {
|
|
|
VipCardRecordWrapper.UserVip userVip = vipCardRecordService.userVipInfo(userId, client);
|
|
@@ -156,6 +157,10 @@ public class MemberPriceSettingsServiceImpl extends ServiceImpl<MemberPriceSetti
|
|
|
throw new BizException(998, "您当前VIP天数更新,请刷新后尝试");
|
|
|
}
|
|
|
}
|
|
|
+ if (bizPrice !=null && detail.getSalePrice().compareTo(bizPrice) !=0) {
|
|
|
+ throw new BizException(998, "产品信息已更新,请重新选择");
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private int getSvipDays(MemberPriceSettingsVo detail, Integer num, VipCardRecordWrapper.UserVip userVip) {
|
|
@@ -421,7 +426,7 @@ public class MemberPriceSettingsServiceImpl extends ServiceImpl<MemberPriceSetti
|
|
|
checkOrder(orderGoodsInfo.getPaymentClient(), detail.getVipType().name(), orderGoodsInfo.getUserId());
|
|
|
|
|
|
// 判断会员剩余天数是否改变
|
|
|
- checkVip(detail, orderGoodsInfo.getVipEndDays(), orderGoodsInfo.getUserId(), orderGoodsInfo.getPaymentClient(), orderGoodsInfo.getGoodNum());
|
|
|
+ checkVip(detail, orderGoodsInfo.getVipEndDays(), orderGoodsInfo.getUserId(), orderGoodsInfo.getPaymentClient(), orderGoodsInfo.getGoodNum(), orderGoodsInfo.getBizPrice());
|
|
|
|
|
|
BigDecimal couponAmount = BigDecimal.ZERO;
|
|
|
ActivityPlanVo activityPlanVo = activityPlanService.detail(orderGoodsInfo.getActivityId());
|