Browse Source

Merge branch 'dev' into 'mp-server-test'

优化

See merge request quanshu/mp-server!909
jiang hao 2 years ago
parent
commit
be31b179fc

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

@@ -292,14 +292,14 @@ public class TicketBoxServiceImpl extends ServiceImpl<TicketBoxMapper, TicketBox
 
             // 如果新的奖品id为空,则清除原来的所有奖品
             if (CollectionUtils.isEmpty(prizeIdList)) {
-                if (TicketTypeEnum.ONLINE.equals(ticketBox.getType())) {
-                    int cashedCount = ticketAwardsPrizeService.count(new LambdaQueryWrapper<TicketAwardsPrize>()
-                        .eq(TicketAwardsPrize::getAwardsId, ticketAwardsParam.getAwardsId())
-                        .ne(TicketAwardsPrize::getCashedQty, 0));
-                    if (cashedCount != 0) {
-                        throw new ServiceException("包含已兑奖记录的奖品不能从奖级中删除");
-                    }
-                }
+//                if (TicketTypeEnum.ONLINE.equals(ticketBox.getType())) {
+//                    int cashedCount = ticketAwardsPrizeService.count(new LambdaQueryWrapper<TicketAwardsPrize>()
+//                        .eq(TicketAwardsPrize::getAwardsId, ticketAwardsParam.getAwardsId())
+//                        .ne(TicketAwardsPrize::getCashedQty, 0));
+//                    if (cashedCount != 0) {
+//                        throw new ServiceException("包含已兑奖记录的奖品不能从奖级中删除");
+//                    }
+//                }
 
                 ticketAwardsPrizeService.update(
                     new LambdaUpdateWrapper<TicketAwardsPrize>().set(TicketAwardsPrize::getIsDeleted, 1)