From b0027c86cdf6b9f537abceade8cd5315a278e67d Mon Sep 17 00:00:00 2001
From: manailin <261030956@qq.com>
Date: 星期日, 25 九月 2022 00:09:54 +0800
Subject: [PATCH] Merge remote-tracking branch 'remotes/origin/sanshuohuitang_dev' into huacheng_test
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDynServiceImpl.java | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 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 30e7974..4918406 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
@@ -68,10 +68,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);
+ }
}
});
}
@@ -99,7 +103,18 @@
comActDynVO.setReadNum(count);
if (nonNull(category) && !category.equals(3)) {
ComActDO comActDO = comActDAO.selectById(comActDynDO.getCommunityId());
- comActDynVO.setCommunityName(comActDO.getName());
+ 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);
}
--
Gitblit v1.7.1