From 9ca6c62acdd4bff4f312bb45e7a686e6cae91e7f Mon Sep 17 00:00:00 2001
From: yanghui <2536613402@qq.com>
Date: 星期五, 02 十二月 2022 11:20:50 +0800
Subject: [PATCH] Merge branch 'local_20221104' into huacheng_test
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDynServiceImpl.java | 23 +++++++++++++++++++----
1 files changed, 19 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 a8c914b..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);
+ }
}
});
}
@@ -102,6 +107,15 @@
if(comActDO!=null){
comActDynVO.setCommunityName(comActDO.getName());
}
+ }
+ if(comActDynDO.getCategory()==4){
+ if(comActDynDO.getReadNum()!=null){
+ comActDynDO.setReadNum(comActDynDO.getReadNum()+1);
+ }
+ else {
+ comActDynDO.setReadNum(1);
+ }
+ comActDynDAO.updateById(comActDynDO);
}
return R.ok(comActDynVO);
}
@@ -186,4 +200,5 @@
return R.ok(iPage);
}
+
}
--
Gitblit v1.7.1