From d4f159d60acf6f263bfa4508a113c0feacd2f5b9 Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期三, 19 六月 2024 18:30:02 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsGroupPurchaseServiceImpl.java | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsGroupPurchaseServiceImpl.java b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsGroupPurchaseServiceImpl.java index 38dc737..4f10ab6 100644 --- a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsGroupPurchaseServiceImpl.java +++ b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsGroupPurchaseServiceImpl.java @@ -21,9 +21,11 @@ import com.ruoyi.goods.controller.management.dto.GoodsGroupPurchaseDTO; import com.ruoyi.goods.controller.management.dto.GoodsGroupPurchaseQuery; import com.ruoyi.goods.controller.management.vo.GoodsGroupPurchaseVO; +import com.ruoyi.goods.domain.MemberGoodsCollection; import com.ruoyi.goods.mapper.GoodsGroupPurchaseMapper; import com.ruoyi.goods.service.IGoodsGroupPurchaseService; import com.ruoyi.goods.service.IGoodsSkuService; +import com.ruoyi.goods.service.IMemberGoodsCollectionService; import com.ruoyi.goods.service.async.AsyncMethodService; import com.ruoyi.system.api.constants.DelayTaskEnum; import com.ruoyi.system.api.constants.NotificationTypeConstant; @@ -68,6 +70,9 @@ private final IGoodsSkuService goodsSkuService; private final AsyncMethodService asyncMethodService; private final RedisService redisService; + + @Resource + private IMemberGoodsCollectionService iMemberGoodsCollectionService; // 创建一个静态共享的ObjectMapper实例以重用 private static final ObjectMapper objectMapper = new ObjectMapper(); /** @@ -319,7 +324,21 @@ goodsGroupPurchaseInfoVO.setListingStatus(one.getListingStatus()); goodsGroupPurchaseInfoVO.setGroupStatus(one.getGroupStatus()); - Order data = orderClient.getOrderByGroupPurchaseMemberId(homeGoodsSkuDTO, SecurityConstants.INNER).getData(); + LambdaQueryWrapper<MemberGoodsCollection> wrapper4= Wrappers.lambdaQuery(); + wrapper4.eq(MemberGoodsCollection::getDelFlag,0); + wrapper4.eq(MemberGoodsCollection::getMemberId,homeGoodsSkuDTO.getMemberId()); + wrapper4.eq(MemberGoodsCollection::getTargetId,one.getId()); + wrapper4.eq(MemberGoodsCollection::getType,1); + List<MemberGoodsCollection> list = iMemberGoodsCollectionService.list(wrapper4); + if (list.size()>0){ + goodsGroupPurchaseInfoVO.setIsCollection(2); + }else{ + goodsGroupPurchaseInfoVO.setIsCollection(1); + } + HomeGoodsSkuDTO homeGoodsSkuDTO1=new HomeGoodsSkuDTO(); + homeGoodsSkuDTO1.setGoodsSkuId(one.getId()); + homeGoodsSkuDTO1.setMemberId(homeGoodsSkuDTO.getMemberId()); + Order data = orderClient.getOrderByGroupPurchaseMemberId(homeGoodsSkuDTO1, SecurityConstants.INNER).getData(); if (data!=null){ goodsGroupPurchaseInfoVO.setIsGoodsGroupPurchase(2); goodsGroupPurchaseInfoVO.setOrder(data); -- Gitblit v1.7.1