优化搜索关键字不能为空格。优化管理端商品上下架时没有清空goods缓存问题
This commit is contained in:
		
							parent
							
								
									b2a8578f43
								
							
						
					
					
						commit
						27112e35b3
					
				| @ -363,6 +363,9 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements | ||||
|         queryWrapper.in(Goods::getId, goodsIds); | ||||
|         List<Goods> goodsList = this.list(queryWrapper); | ||||
|         for (Goods goods : goodsList) { | ||||
|             if (GoodsStatusEnum.DOWN.equals(goodsStatusEnum)) { | ||||
|                 cache.remove(CachePrefix.GOODS.getPrefix() + goods.getId()); | ||||
|             } | ||||
|             goodsSkuService.updateGoodsSkuStatus(goods); | ||||
|         } | ||||
|         if (GoodsStatusEnum.DOWN.equals(goodsStatusEnum)) { | ||||
|  | ||||
| @ -88,7 +88,7 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService { | ||||
|         if (!exists) { | ||||
|             esGoodsIndexService.init(); | ||||
|         } | ||||
|         if (CharSequenceUtil.isNotEmpty(searchDTO.getKeyword())) { | ||||
|         if (CharSequenceUtil.isNotBlank(searchDTO.getKeyword())) { | ||||
|             cache.incrementScore(CachePrefix.HOT_WORD.getPrefix(), searchDTO.getKeyword()); | ||||
|         } | ||||
|         NativeSearchQueryBuilder searchQueryBuilder = createSearchQueryBuilder(searchDTO, pageVo); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 paulGao
						paulGao