|
|
@@ -383,9 +383,10 @@ public class GoodsDonController {
|
|
|
UserSharedDto userSharedDto = userService.getUserShredDtoByDsCode(dsCode);
|
|
|
dsUserId.set(userSharedDto.getSharedId());
|
|
|
}
|
|
|
- List<Long> giftSkuIds = giftCardGoodsSkuMapper.selectList(Wrappers.lambdaQuery(GiftCardGoodsSku.class)
|
|
|
+ views.setIsGift(giftCardGoodsSkuMapper.selectCount(Wrappers.lambdaQuery(GiftCardGoodsSku.class)
|
|
|
+ .eq(GiftCardGoodsSku::getGoodsId, views.getId())
|
|
|
.eq(GiftCardGoodsSku::getStatus, 1)
|
|
|
- .eq(GiftCardGoodsSku::getDeleted, 1)).stream().map(GiftCardGoodsSku::getGcSkuId).collect(Collectors.toList());
|
|
|
+ .eq(GiftCardGoodsSku::getDeleted, 1)) > 0);
|
|
|
views.setSkuList(views.getSkuList().stream().filter(sku -> {
|
|
|
if (StrUtil.isNotBlank(sku.getUserOwns())) {
|
|
|
if (dsUserId.get() == 0 && fUid != null && existsChannel.get()) {
|
|
|
@@ -399,9 +400,6 @@ public class GoodsDonController {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
- if (CollUtil.isNotEmpty(giftSkuIds) && giftSkuIds.contains(sku.getId())) {
|
|
|
- sku.setIsGiftSku(true);
|
|
|
- }
|
|
|
if (sku.getIsDp()) {
|
|
|
sku.setDpSkuViews(beanSearcher.searchAll(GoodsDiscountPlusPurchaseRelationFrontView.class, MapUtils.builder()
|
|
|
.field(GoodsDiscountPlusPurchaseRelationFrontView::getSkuId, sku.getId())
|