浏览代码

奖品总数值校验

cup 2 年之前
父节点
当前提交
842118b247
共有 1 个文件被更改,包括 7 次插入7 次删除
  1. 7 7
      mp-service/src/main/java/com/qs/mp/admin/service/impl/TicketBoxServiceImpl.java

+ 7 - 7
mp-service/src/main/java/com/qs/mp/admin/service/impl/TicketBoxServiceImpl.java

@@ -211,13 +211,13 @@ public class TicketBoxServiceImpl extends ServiceImpl<TicketBoxMapper, TicketBox
             }
 
             // 线上票需要判断商品数量合法性
-            if (TicketTypeEnum.ONLINE.equals(ticketBox.getType())) {
-                int quantity = ticketAwardsParam.getPrizeList().stream().mapToInt(TicketAwardsPrizeParam::getQuantity)
-                    .sum();
-                if (quantity != ticketAwardsParam.getQuantity()) {
-                    throw new ServiceException("奖品总数值不相同");
-                }
-            }
+//            if (TicketTypeEnum.ONLINE.equals(ticketBox.getType())) {
+//                int quantity = ticketAwardsParam.getPrizeList().stream().mapToInt(TicketAwardsPrizeParam::getQuantity)
+//                    .sum();
+//                if (quantity != ticketAwardsParam.getQuantity()) {
+//                    throw new ServiceException("奖品总数值不相同");
+//                }
+//            }
             TicketAwards ticketAwards = new TicketAwards();
             ticketAwards.setAwardsId(ticketAwardsParam.getAwardsId());
             ticketAwards.setAwardsLabel(ticketAwardsParam.getAwardsLabel());