!33 修复文章获取内容转义,限时抢购无参加商品不开启,商品搜索报错
Merge pull request !33 from OceansDeep/feature/pg
This commit is contained in:
		
						commit
						1de4dea1fb
					
				| @ -1,7 +1,9 @@ | ||||
| package cn.lili.modules.page.entity.dos; | ||||
| 
 | ||||
| import cn.lili.mybatis.BaseEntity; | ||||
| import cn.hutool.core.text.CharSequenceUtil; | ||||
| import cn.hutool.http.HtmlUtil; | ||||
| import cn.lili.modules.page.entity.enums.ArticleEnum; | ||||
| import cn.lili.mybatis.BaseEntity; | ||||
| import com.baomidou.mybatisplus.annotation.TableName; | ||||
| import io.swagger.annotations.ApiModel; | ||||
| import io.swagger.annotations.ApiModelProperty; | ||||
| @ -47,4 +49,12 @@ public class Article extends BaseEntity { | ||||
|      */ | ||||
|     @ApiModelProperty(value = "类型") | ||||
|     private String type; | ||||
| 
 | ||||
|     public String getContent() { | ||||
|         if (CharSequenceUtil.isNotEmpty(content)) { | ||||
|             return HtmlUtil.unescape(content); | ||||
|         } | ||||
|         return content; | ||||
|     } | ||||
| 
 | ||||
| } | ||||
| @ -398,11 +398,9 @@ public class PromotionServiceImpl implements PromotionService { | ||||
|         seckill.setPromotionStatus(promotionMessage.getPromotionStatus()); | ||||
|         result = this.seckillService.update(updateWrapper(promotionMessage)); | ||||
|         log.info("更新限时抢购活动状态:{}", seckill); | ||||
|         //判断参与活动的商品是否为空,如果为空则返回 | ||||
|         if (seckill.getSeckillApplyList() == null) { | ||||
|             return result; | ||||
|         } | ||||
| 
 | ||||
|         //判断参与活动的商品是否为空 | ||||
|         if (seckill.getSeckillApplyList() != null && !seckill.getSeckillApplyList().isEmpty()) { | ||||
|             //循环秒杀商品数据,将数据按照时间段进行存储 | ||||
|             for (SeckillApply seckillApply : seckill.getSeckillApplyList()) { | ||||
|                 if (seckillApply.getPromotionApplyStatus().equals(PromotionApplyStatusEnum.PASS.name())) { | ||||
| @ -434,6 +432,8 @@ public class PromotionServiceImpl implements PromotionService { | ||||
|                     this.goodsIndexService.updateEsGoodsIndex(seckillApply.getSkuId(), seckill1, promotionTypeEnum.name() + "-" + seckillApply.getTimeLine(), seckillApply.getPrice()); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         this.mongoTemplate.save(seckill); | ||||
|         return result; | ||||
|     } | ||||
|  | ||||
| @ -164,6 +164,7 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService { | ||||
|                 } | ||||
|                 String[] split = ArrayUtil.distinct(categoryPath.split(",")); | ||||
|                 String[] nameSplit = categoryNamePath.split(","); | ||||
|                 if (split.length == nameSplit.length) { | ||||
|                     for (int i = 0; i < split.length; i++) { | ||||
|                         SelectorOptions so = new SelectorOptions(); | ||||
|                         so.setName(nameSplit[i]); | ||||
| @ -172,7 +173,7 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService { | ||||
|                             categoryOptions.add(so); | ||||
|                         } | ||||
|                     } | ||||
| 
 | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         esGoodsRelatedInfo.setCategories(categoryOptions); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 OceansDeep
						OceansDeep