Browse Source

奖品总数值校验

cup 2 years ago
parent
commit
842118b247

+ 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());