From 1f9b64476716a6a1de3bcb886bf4e64b123f7523 Mon Sep 17 00:00:00 2001 From: jiangqs <jiangqs> Date: 星期四, 06 七月 2023 18:28:31 +0800 Subject: [PATCH] 管理台bug和用户端活动商品购买 --- ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/activity/ActivityGoodsServiceImpl.java | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/activity/ActivityGoodsServiceImpl.java b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/activity/ActivityGoodsServiceImpl.java index 33cf898..eb758bb 100644 --- a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/activity/ActivityGoodsServiceImpl.java +++ b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/activity/ActivityGoodsServiceImpl.java @@ -7,9 +7,10 @@ import com.ruoyi.goods.domain.vo.MgtActivityGoodsListVo; import com.ruoyi.goods.mapper.activity.ActivityGoodsMapper; import com.ruoyi.goods.service.activity.ActivityGoodsService; +import com.ruoyi.goods.service.activity.ActivityRecordService; +import com.ruoyi.system.api.domain.dto.ActivityGoodsGetDto; import com.ruoyi.system.api.domain.poji.activity.ActivityGoods; - - +import com.ruoyi.system.api.domain.vo.ActivityGoodsGetVo; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -29,15 +30,18 @@ @Resource private ActivityGoodsMapper activityGoodsMapper; + @Resource + private ActivityRecordService activityRecordService; + /** * 通过id获取活动商品 * @param goodsId * @return */ @Override - public ActivityGoods getByGoodsId(String goodsId){ + public ActivityGoods getByGoodsId(String activityId,String goodsId){ LambdaQueryWrapper<ActivityGoods> queryWrapper = Wrappers.lambdaQuery(); - queryWrapper.eq(ActivityGoods::getDelFlag, 0).eq(ActivityGoods::getGoodsId, goodsId); + queryWrapper.eq(ActivityGoods::getDelFlag, 0).eq(ActivityGoods::getActivityId, activityId).eq(ActivityGoods::getGoodsId, goodsId); ActivityGoods activityGoods = this.getOne(queryWrapper,false); return activityGoods; } @@ -69,4 +73,6 @@ public List<MgtActivityGoodsListVo> listVoByActivityId(String activityId){ return activityGoodsMapper.listVoByActivityId(activityId); } + + } -- Gitblit v1.7.1