From 4fd5d868a3e3b28bf6f55a1aa12212db70e1550f Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期五, 07 四月 2023 18:27:34 +0800
Subject: [PATCH] 修改 微服务新增报错
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDynServiceImpl.java | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDynServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDynServiceImpl.java
index cb0f377..040b631 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDynServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDynServiceImpl.java
@@ -5,6 +5,7 @@
import javax.annotation.Resource;
+import com.panzhihua.common.model.vos.community.DataCount;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
@@ -68,10 +69,14 @@
List<ComActDynVO> records = iPage.getRecords();
if (!ObjectUtils.isEmpty(records)) {
records.forEach(comActDynVO1 -> {
- String content = comActDynVO1.getContent();
- if (!ObjectUtils.isEmpty(content)) {
- String text = RichTextUtil.getText(content);
- comActDynVO1.setContentText(text);
+ if(comActDynVO1.getCategory()!=null&&comActDynVO1.getCategory()==4){
+ comActDynVO1.setContent(null);
+ }else {
+ String content = comActDynVO1.getContent();
+ if (!ObjectUtils.isEmpty(content)) {
+ String text = RichTextUtil.getText(content);
+ comActDynVO1.setContentText(text);
+ }
}
});
}
@@ -195,4 +200,5 @@
return R.ok(iPage);
}
+
}
--
Gitblit v1.7.1