|
@@ -184,8 +184,11 @@ public class TicketBoxServiceImpl extends ServiceImpl<TicketBoxMapper, TicketBox
|
|
|
}
|
|
|
|
|
|
// 清除指定渠道内容
|
|
|
- ticketBoxChannelService.remove(
|
|
|
- new LambdaUpdateWrapper<TicketBoxChannel>().eq(TicketBoxChannel::getBoxId, ticketBox.getBoxId()));
|
|
|
+ if (TicketBoxSaleChannelTypeEnum.ALL.getValue().equals(param.getSaleChannelType())
|
|
|
+ || TicketBoxSaleChannelTypeEnum.PART.getValue().equals(param.getSaleChannelType())) {
|
|
|
+ ticketBoxChannelService.remove(
|
|
|
+ new LambdaUpdateWrapper<TicketBoxChannel>().eq(TicketBoxChannel::getBoxId, ticketBox.getBoxId()));
|
|
|
+ }
|
|
|
|
|
|
// 指定渠道
|
|
|
if (TicketBoxSaleChannelTypeEnum.PART.getValue().equals(param.getSaleChannelType())) {
|
|
@@ -472,6 +475,26 @@ public class TicketBoxServiceImpl extends ServiceImpl<TicketBoxMapper, TicketBox
|
|
|
ticketBoxChannelService.saveBatch(ticketBoxChannelList);
|
|
|
}
|
|
|
|
|
|
+ // 线上票指定门店
|
|
|
+ if (TicketBoxSaleChannelTypeEnum.SHOP.getValue().equals(param.getSaleChannelType())) {
|
|
|
+ List<Long> channelIdList = param.getChannelIdList();
|
|
|
+ if (CollectionUtils.isEmpty(channelIdList)) {
|
|
|
+ throw new ServiceException("门店列表为空");
|
|
|
+ }
|
|
|
+ if (channelIdList.size() > 1) {
|
|
|
+ throw new ServiceException("只能指定一个门店");
|
|
|
+ }
|
|
|
+
|
|
|
+ List<TicketBoxChannel> onlineTicketBoxChannelList = new ArrayList<>();
|
|
|
+ for (Long channelId : channelIdList) {
|
|
|
+ TicketBoxChannel ticketBoxChannel = new TicketBoxChannel();
|
|
|
+ ticketBoxChannel.setBoxId(ticketBox.getBoxId());
|
|
|
+ ticketBoxChannel.setChannelId(channelId);
|
|
|
+ onlineTicketBoxChannelList.add(ticketBoxChannel);
|
|
|
+ }
|
|
|
+ ticketBoxChannelService.saveBatch(onlineTicketBoxChannelList);
|
|
|
+ }
|
|
|
+
|
|
|
// 创建奖级
|
|
|
List<TicketAwards> ticketAwardsList = new ArrayList<>();
|
|
|
List<TicketAwardsPrize> awardsPrizeList = new ArrayList<>();
|