!130 修复秒杀每日清除无效活动错误

Merge pull request !130 from OceansDeep/feature/pg
This commit is contained in:
OceansDeep 2022-02-16 09:49:38 +00:00 committed by Gitee
commit d0f952bd68
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 4 additions and 3 deletions

View File

@ -239,8 +239,8 @@ public interface MemberService extends IService<Member> {
/**
* 获取用户VO
* @param id
* @return
* @param id 会员id
* @return 用户VO
*/
MemberVO getMember(String id);
}

View File

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