|
@@ -936,21 +936,21 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
|
|
|
}
|
|
|
|
|
|
// 用户参与活动的次数
|
|
|
- List<StoreOrder> userCombinationOrders = this.getUserCurrentCombinationOrders(userId, storeCombination.getId());
|
|
|
- if (CollUtil.isNotEmpty(userCombinationOrders)) {
|
|
|
+ // List<StoreOrder> userCombinationOrders = this.getUserCurrentCombinationOrders(userId, storeCombination.getId());
|
|
|
+ // if (CollUtil.isNotEmpty(userCombinationOrders)) {
|
|
|
// 判断是否有待支付订单
|
|
|
- List<StoreOrder> unPayOrders = userCombinationOrders.stream().filter(e -> e.getStatus().equals(PinkOrderStatusEnum.GROUP_ORDER_TO_PAY.getKey())).collect(Collectors.toList());
|
|
|
- if (!unPayOrders.isEmpty()) {
|
|
|
- throw new ServiceException("您有拼团待支付订单,请支付后再购买");
|
|
|
- }
|
|
|
- int payNum = userCombinationOrders.stream().mapToInt(StoreOrder::getTotalNum).sum();
|
|
|
- if (storeCombination.getNum() <= payNum) {
|
|
|
- throw new ServiceException("您已达到该商品拼团活动上限");
|
|
|
- }
|
|
|
- if ((payNum + productNum) > storeCombination.getNum()) {
|
|
|
- throw new ServiceException("超过该商品拼团活动您的购买上限");
|
|
|
- }
|
|
|
- }
|
|
|
+// List<StoreOrder> unPayOrders = userCombinationOrders.stream().filter(e -> e.getStatus().equals(PinkOrderStatusEnum.GROUP_ORDER_TO_PAY.getKey())).collect(Collectors.toList());
|
|
|
+// if (!unPayOrders.isEmpty()) {
|
|
|
+// throw new ServiceException("您有拼团待支付订单,请支付后再购买");
|
|
|
+// }
|
|
|
+// int payNum = userCombinationOrders.stream().mapToInt(StoreOrder::getTotalNum).sum();
|
|
|
+// if (storeCombination.getNum() <= payNum) {
|
|
|
+// throw new ServiceException("您已达到该商品拼团活动上限");
|
|
|
+// }
|
|
|
+// if ((payNum + productNum) > storeCombination.getNum()) {
|
|
|
+// throw new ServiceException("超过该商品拼团活动您的购买上限");
|
|
|
+// }
|
|
|
+ // }
|
|
|
|
|
|
MyRecord record = new MyRecord();
|
|
|
record.set("productAttrValue", productAttrValue);
|