!329 fix & improve

Merge pull request !329 from OceansDeep/pg
This commit is contained in:
OceansDeep
2024-01-24 02:11:26 +00:00
committed by Gitee
4 changed files with 85 additions and 59 deletions

View File

@@ -23,7 +23,7 @@ public enum PromotionTypeEnum {
/**
* 有促销库存的活动类型
*/
static final PromotionTypeEnum[] haveStockPromotion = new PromotionTypeEnum[]{PINTUAN, SECKILL, KANJIA, POINTS_GOODS};
public static final PromotionTypeEnum[] haveStockPromotion = new PromotionTypeEnum[]{PINTUAN, SECKILL, KANJIA, POINTS_GOODS};
private final String description;

View File

@@ -328,7 +328,11 @@ public class GoodsSkuServiceImpl extends ServiceImpl<GoodsSkuMapper, GoodsSku> i
}
}
goodsSkuDetail.getGoodsGalleryList().addAll(goodsVO.getGoodsGalleryList());
if (goodsSkuDetail.getGoodsGalleryList() == null || goodsSkuDetail.getGoodsGalleryList().isEmpty()) {
goodsSkuDetail.setGoodsGalleryList(goodsVO.getGoodsGalleryList());
} else {
goodsSkuDetail.getGoodsGalleryList().addAll(goodsVO.getGoodsGalleryList());
}
map.put("data", goodsSkuDetail);
//获取分类

View File

@@ -399,6 +399,8 @@ public class SeckillApplyServiceImpl extends ServiceImpl<SeckillApplyMapper, Sec
Object quantity = cache.get(promotionGoodsStockCacheKey);
if (quantity != null) {
goodsVO.setQuantity((Integer) quantity);
} else {
cache.put(promotionGoodsStockCacheKey, seckillApply.getQuantity());
}
seckillGoodsVoS.add(goodsVO);
}