Skip to content

Commit

Permalink
促销活动清洗,先处理砍价,其他的后续处理
Browse files Browse the repository at this point in the history
  • Loading branch information
chopper711 committed Sep 6, 2022
1 parent 90a2ec9 commit 9bc1247
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import cn.lili.modules.promotion.entity.vos.kanjia.KanjiaActivityGoodsVO;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;


/**
* 砍价业务层
Expand Down Expand Up @@ -69,4 +71,9 @@ public interface KanjiaActivityGoodsService extends AbstractPromotionsService<Ka
*/
boolean updateKanjiaActivityGoods(KanjiaActivityGoodsDTO kanjiaActivityGoodsDTO);

/**
* 根据商品id删除促销活动
* @param goodsIds
*/
void deleteByGoodsIds(List<String> goodsIds);
}
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,11 @@ public boolean updateKanjiaActivityGoods(KanjiaActivityGoodsDTO kanJiaActivityGo
return this.updateById(kanJiaActivityGoodsDTO);
}

@Override
public void deleteByGoodsIds(List<String> goodsIds) {
this.remove(new QueryWrapper<KanjiaActivityGoods>().in("goods_id", goodsIds));
}

/**
* 当前促销类型
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ public class PromotionServiceImpl implements PromotionService {
@Autowired
private PointsGoodsService pointsGoodsService;

@Autowired
private KanjiaActivityGoodsService kanjiaActivityGoodsService;


/**
* 获取当前进行的所有促销活动信息
Expand Down Expand Up @@ -119,6 +122,7 @@ public Map<String, Object> getGoodsSkuPromotionMap(String storeId, String goodsS
@Override
public void removeByGoodsIds(String goodsIdsJsonStr) {
promotionGoodsService.deletePromotionGoods(Arrays.asList(goodsIdsJsonStr.split(",")));
kanjiaActivityGoodsService.deleteByGoodsIds(Arrays.asList(goodsIdsJsonStr.split(",")))
}

private void getGoodsCurrentSeckill(String esPromotionKey, PromotionGoods promotionGoods, Map<String, Object> promotionMap) {
Expand Down

0 comments on commit 9bc1247

Please sign in to comment.