Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop
This commit is contained in:
commit
505366d9bc
@ -1,7 +1,9 @@
|
|||||||
package cn.lili.modules.page.entity.dos;
|
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.modules.page.entity.enums.ArticleEnum;
|
||||||
|
import cn.lili.mybatis.BaseEntity;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -47,4 +49,12 @@ public class Article extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "类型")
|
@ApiModelProperty(value = "类型")
|
||||||
private String type;
|
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());
|
seckill.setPromotionStatus(promotionMessage.getPromotionStatus());
|
||||||
result = this.seckillService.update(updateWrapper(promotionMessage));
|
result = this.seckillService.update(updateWrapper(promotionMessage));
|
||||||
log.info("更新限时抢购活动状态:{}", seckill);
|
log.info("更新限时抢购活动状态:{}", seckill);
|
||||||
//判断参与活动的商品是否为空,如果为空则返回
|
|
||||||
if (seckill.getSeckillApplyList() == null) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
//判断参与活动的商品是否为空
|
||||||
|
if (seckill.getSeckillApplyList() != null && !seckill.getSeckillApplyList().isEmpty()) {
|
||||||
//循环秒杀商品数据,将数据按照时间段进行存储
|
//循环秒杀商品数据,将数据按照时间段进行存储
|
||||||
for (SeckillApply seckillApply : seckill.getSeckillApplyList()) {
|
for (SeckillApply seckillApply : seckill.getSeckillApplyList()) {
|
||||||
if (seckillApply.getPromotionApplyStatus().equals(PromotionApplyStatusEnum.PASS.name())) {
|
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.goodsIndexService.updateEsGoodsIndex(seckillApply.getSkuId(), seckill1, promotionTypeEnum.name() + "-" + seckillApply.getTimeLine(), seckillApply.getPrice());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.mongoTemplate.save(seckill);
|
this.mongoTemplate.save(seckill);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -164,6 +164,7 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService {
|
|||||||
}
|
}
|
||||||
String[] split = ArrayUtil.distinct(categoryPath.split(","));
|
String[] split = ArrayUtil.distinct(categoryPath.split(","));
|
||||||
String[] nameSplit = categoryNamePath.split(",");
|
String[] nameSplit = categoryNamePath.split(",");
|
||||||
|
if (split.length == nameSplit.length) {
|
||||||
for (int i = 0; i < split.length; i++) {
|
for (int i = 0; i < split.length; i++) {
|
||||||
SelectorOptions so = new SelectorOptions();
|
SelectorOptions so = new SelectorOptions();
|
||||||
so.setName(nameSplit[i]);
|
so.setName(nameSplit[i]);
|
||||||
@ -172,7 +173,7 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService {
|
|||||||
categoryOptions.add(so);
|
categoryOptions.add(so);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
esGoodsRelatedInfo.setCategories(categoryOptions);
|
esGoodsRelatedInfo.setCategories(categoryOptions);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user