优化代码

This commit is contained in:
paulGao
2022-02-24 09:33:36 +08:00
parent 63b84ee69d
commit 627a1d7d5a
3 changed files with 4 additions and 2 deletions

View File

@@ -535,7 +535,7 @@ public class EsGoodsIndexServiceImpl extends BaseElasticsearchService implements
if (promotionMap != null && !promotionMap.isEmpty()) {
//促销不为空则进行清洗
promotionMap.entrySet().removeIf(i -> {
JSONObject promotionJson = (JSONObject) i.getValue();
JSONObject promotionJson = JSONUtil.parseObj(i.getValue());
BasePromotions promotion = promotionJson.toBean(BasePromotions.class);
return promotion.getEndTime() != null && promotion.getEndTime().getTime() < DateUtil.date().getTime();
});