|
@@ -70,13 +70,15 @@ public class ChannelTicketController extends BaseApiController {
|
|
|
|
|
|
Long channelId = SecurityUtils.getLoginUser().getChannelId();
|
|
|
Channel channel = channelService.getById(channelId);
|
|
|
-// List<Long> channelIds = new ArrayList<>();
|
|
|
-// if (StringUtils.isNotBlank(channel.getChannelNo())) {
|
|
|
-// String[] split = StringUtils.split(channel.getChannelNo(), ".");
|
|
|
-// for (String s : split) {
|
|
|
-// channelIds.add(Long.valueOf(s));
|
|
|
-// }
|
|
|
-// }
|
|
|
+ List<Long> channelIds = new ArrayList<>();
|
|
|
+ if (TicketTypeEnum.OFFLINE.equals(param.getType())) {
|
|
|
+ if (StringUtils.isNotBlank(channel.getChannelNo())) {
|
|
|
+ String[] split = StringUtils.split(channel.getChannelNo(), ".");
|
|
|
+ for (String s : split) {
|
|
|
+ channelIds.add(Long.valueOf(s));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
QueryWrapper<TicketBox> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
|
if (Objects.nonNull(param.getIsPre()) && param.getIsPre() == 1) {
|
|
@@ -108,14 +110,14 @@ public class ChannelTicketController extends BaseApiController {
|
|
|
}
|
|
|
|
|
|
queryWrapper.orderByDesc("t1.sort_weight");
|
|
|
- queryWrapper.eq("t1.sale_channel_type", TicketBoxSaleChannelTypeEnum.ALL.getValue());
|
|
|
-
|
|
|
-// queryWrapper.nested(wrapper -> {
|
|
|
-// wrapper.eq("t1.sale_channel_type", TicketBoxSaleChannelTypeEnum.ALL.getValue());
|
|
|
-// if (channelIds.size() != 0) {
|
|
|
-// wrapper.or().in("t2.channel_id",channelIds);
|
|
|
-// }
|
|
|
-// });
|
|
|
+// queryWrapper.eq("t1.sale_channel_type", TicketBoxSaleChannelTypeEnum.ALL.getValue());
|
|
|
+
|
|
|
+ queryWrapper.nested(wrapper -> {
|
|
|
+ wrapper.eq("t1.sale_channel_type", TicketBoxSaleChannelTypeEnum.ALL.getValue());
|
|
|
+ if (channelIds.size() != 0) {
|
|
|
+ wrapper.or().in("t2.channel_id",channelIds);
|
|
|
+ }
|
|
|
+ });
|
|
|
startPage();
|
|
|
List<TicketBox> ticketBoxes = ticketBoxService.listBySaleChannel(queryWrapper);
|
|
|
|