!198 修复编辑有参加商品的促销活动的时间时,原参与活动的商品的时间没有更新问题

Merge pull request !198 from OceansDeep/feature/pg
This commit is contained in:
OceansDeep 2022-06-22 07:06:39 +00:00 committed by Gitee
commit 25e8b9b578
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -133,6 +133,13 @@ public class PromotionTools {
promotionGoods.setStoreName(promotion.getStoreName());
}
promotionGoods.setTitle(promotion.getPromotionName());
// 如果是秒杀活动保留原时间
if (promotionGoods.getStartTime() == null || !PromotionTypeEnum.SECKILL.equals(promotionTypeEnum)) {
promotionGoods.setStartTime(promotion.getStartTime());
}
if (promotionGoods.getStartTime() == null || !PromotionTypeEnum.SECKILL.equals(promotionTypeEnum)) {
promotionGoods.setEndTime(promotion.getEndTime());
}
promotionGoods.setStartTime(promotion.getStartTime());
promotionGoods.setEndTime(promotion.getEndTime());
promotionGoods.setPromotionType(promotionTypeEnum.name());