!211 更新部分es日志

Merge pull request !211 from OceansDeep/feature/pg
This commit is contained in:
OceansDeep 2022-07-18 04:11:55 +00:00 committed by Gitee
commit c6596fff1a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 2 deletions

View File

@ -122,6 +122,7 @@ ignored:
- /common/common/slider/** - /common/common/slider/**
- /common/common/sms/** - /common/common/sms/**
- /common/common/logo - /common/common/logo
- /common/common/site
- /druid/** - /druid/**
- /swagger-ui.html - /swagger-ui.html
- /doc.html - /doc.html

View File

@ -496,6 +496,7 @@ public class EsGoodsIndexServiceImpl extends BaseElasticsearchService implements
log.info("更新商品索引的促销信息----------"); log.info("更新商品索引的促销信息----------");
log.info("商品ids: {}", ids); log.info("商品ids: {}", ids);
log.info("活动: {}", promotion); log.info("活动: {}", promotion);
log.info("key: {}", key);
for (String id : ids) { for (String id : ids) {
UpdateRequest updateRequest = this.updateEsGoodsIndexPromotions(id, promotion, key); UpdateRequest updateRequest = this.updateEsGoodsIndexPromotions(id, promotion, key);
if (updateRequest != null) { if (updateRequest != null) {
@ -730,8 +731,6 @@ public class EsGoodsIndexServiceImpl extends BaseElasticsearchService implements
promotionMap = goodsIndex.getOriginPromotionMap(); promotionMap = goodsIndex.getOriginPromotionMap();
} }
log.info("ES修改商品活动索引-活动信息:{}", promotion);
log.info("ES修改商品活动索引-活动信息状态:{}", promotion.getPromotionStatus());
log.info("ES修改商品活动索引-原商品索引信息:{}", goodsIndex); log.info("ES修改商品活动索引-原商品索引信息:{}", goodsIndex);
log.info("ES修改商品活动索引-原商品索引活动信息:{}", promotionMap); log.info("ES修改商品活动索引-原商品索引活动信息:{}", promotionMap);
//如果活动已结束 //如果活动已结束
@ -760,6 +759,7 @@ public class EsGoodsIndexServiceImpl extends BaseElasticsearchService implements
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("promotionMap", JSONUtil.toJsonStr(promotionMap)); params.put("promotionMap", JSONUtil.toJsonStr(promotionMap));
Script script = new Script(ScriptType.INLINE, "painless", "ctx._source.promotionMapJson=params.promotionMap;", params); Script script = new Script(ScriptType.INLINE, "painless", "ctx._source.promotionMapJson=params.promotionMap;", params);
log.info("执行脚本内容:{}", script);
updateRequest.script(script); updateRequest.script(script);
return updateRequest; return updateRequest;
} }