|
|
@@ -15,6 +15,7 @@ import com.cyksj.common.util.StringUtil;
|
|
|
import com.cyksj.dto.Result;
|
|
|
import com.cyksj.dto.UserSharedDto;
|
|
|
import com.cyksj.enums.GatewayResponse;
|
|
|
+import com.cyksj.mapper.GiftCardGoodsSkuMapper;
|
|
|
import com.cyksj.mapper.GoodsDonSkuMapper;
|
|
|
import com.cyksj.mapper.OrderDonMapper;
|
|
|
import com.cyksj.mapper.RegisterOrderDonMapper;
|
|
|
@@ -87,6 +88,8 @@ public class GoodsDonController {
|
|
|
|
|
|
private final UserBindRelationService userBindRelationService;
|
|
|
|
|
|
+ private final GiftCardGoodsSkuMapper giftCardGoodsSkuMapper;
|
|
|
+
|
|
|
/**
|
|
|
* 获取平台商品分类
|
|
|
*/
|
|
|
@@ -380,6 +383,9 @@ public class GoodsDonController {
|
|
|
UserSharedDto userSharedDto = userService.getUserShredDtoByDsCode(dsCode);
|
|
|
dsUserId.set(userSharedDto.getSharedId());
|
|
|
}
|
|
|
+ List<Long> giftSkuIds = giftCardGoodsSkuMapper.selectList(Wrappers.lambdaQuery(GiftCardGoodsSku.class)
|
|
|
+ .eq(GiftCardGoodsSku::getStatus, 1)
|
|
|
+ .eq(GiftCardGoodsSku::getDeleted, 1)).stream().map(GiftCardGoodsSku::getGcSkuId).collect(Collectors.toList());
|
|
|
views.setSkuList(views.getSkuList().stream().filter(sku -> {
|
|
|
if (StrUtil.isNotBlank(sku.getUserOwns())) {
|
|
|
if (dsUserId.get() == 0 && fUid != null && existsChannel.get()) {
|
|
|
@@ -393,6 +399,9 @@ 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())
|