| | |
| | | |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | |
| | | } |
| | | } |
| | | if(comActDynDO.getCategory()==4){ |
| | | comActDynDO.setReadNum(comActDynDO.getReadNum()+1); |
| | | if(comActDynDO.getReadNum()!=null){ |
| | | comActDynDO.setReadNum(comActDynDO.getReadNum()+1); |
| | | } |
| | | else { |
| | | comActDynDO.setReadNum(1); |
| | | } |
| | | comActDynDAO.updateById(comActDynDO); |
| | | } |
| | | return R.ok(comActDynVO); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | |
| | | } |