Commit ca0f49bf authored by 刘基明's avatar 刘基明

转发存储es fix

parent 662ac7aa
package com.tanpu.community.api.beans.qo;
import com.tanpu.community.api.beans.vo.ImagesDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class ESThemeQo {
......@@ -15,7 +12,7 @@ public class ESThemeQo {
@ApiModelProperty(value = "标题")
public String title;
@ApiModelProperty(value = "类型 1:讨论无标题 2:长文有标题 3:转发 4:评论")
@ApiModelProperty(value = "类型 1:讨论无标题 2:长文有标题 3:转发")
public Integer themeType;
@ApiModelProperty(value = "文本内容")
......
......@@ -217,6 +217,13 @@ public class ThemeManager {
themeService.update(themeEntity, req.getEditThemeId());
themeEntity.setThemeId(req.getEditThemeId());
}
try {
esService.insertOrUpdateTheme(ConvertUtil.convert(themeEntity));
} catch (Exception e) {
log.error("error in save theme to ES. themeId:{}, error:{}", themeEntity.getThemeId(), ExceptionUtils.getStackTrace(e));
}
return CreateThemeResp.builder().themeId(themeEntity.getThemeId()).build();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment