| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.community.ComActDynVO; |
| | | import com.panzhihua.common.utlis.RichTextUtil; |
| | | import com.panzhihua.service_community.dao.ComActDAO; |
| | | import com.panzhihua.service_community.dao.ComActDynDAO; |
| | | import com.panzhihua.service_community.dao.ComActDynUserDAO; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComActDynVO> iPage = comActDynDAO.pageDynamic(page, comActDynVO); |
| | | 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); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | |
| | | } |
| | | return R.fail(); |
| | | }else{ |
| | | return R.ok(); |
| | | return R.fail(); |
| | | } |
| | | |
| | | } |
| | |
| | | @Override |
| | | public R timedTaskDynIstopping() { |
| | | int num=comActDynUserDAO.timedTaskDynIstopping(); |
| | | if (num>0) { |
| | | log.info("一共维护社区动态数量【{}】",num); |
| | | } |
| | | return R.ok(); |
| | | log.info("定时任务--一共维护社区动态数量【{}】",num); |
| | | return R.ok(num); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务刷新社区动态发布状态 |
| | | * |
| | | * @return 刷新结果 |
| | | */ |
| | | @Override |
| | | public R timedTaskDynStatus() { |
| | | int num=comActDynDAO.timedTaskDynStatus(); |
| | | log.info("定时任务--一共刷新社区动态发布状态数量【{}】",num); |
| | | return R.ok(num); |
| | | } |
| | | |
| | | |
| | | } |