| | |
| | | .ne(GoodsSeckill::getStartStatus, StartStatusEnum.ENDED) |
| | | .eq(GoodsSeckill::getListingStatus, ListingStatusEnum.ON_SHELVES) |
| | | .le(GoodsSeckill::getStartTime, dto.getStartTime()) |
| | | .ge(GoodsSeckill::getEndTime, dto.getEndTime()).list(); |
| | | .ge(GoodsSeckill::getEndTime, dto.getStartTime()).list(); |
| | | Set<Long> existGoodsSkuIdSet = list.stream().map(GoodsSeckill::getGoodsSkuId) |
| | | .collect(Collectors.toSet()); |
| | | if (!existGoodsSkuIdSet.isEmpty()) { |
| | |
| | | return goodsSkuMap.get(item.getGoodsSkuId()); |
| | | }).filter(Objects::nonNull) |
| | | .collect(Collectors.joining(",")); |
| | | throw new ServiceException("添加失败,当前商品在该时间段内有其他秒杀活动"); |
| | | throw new ServiceException( |
| | | String.format("添加失败,商品%s在该时间段内有其他秒杀活动", goodsSkuNames)); |
| | | } |
| | | } |
| | | this.saveBatch(goodsSeckills); |