From 2eea3290641657d2ee13edd90d27f8b2ec01c209 Mon Sep 17 00:00:00 2001 From: 罗yu 元桥 <2376770955@qq.com> Date: 星期六, 08 五月 2021 18:23:48 +0800 Subject: [PATCH] Merge branch 'test' into 'master' --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDynServiceImpl.java | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 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 03d4b34..2f4ccdb 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 @@ -145,5 +145,37 @@ return R.ok(num); } + /** + * 管理后台分页查询社区动态 + * @param comActDynVO 查询参数 + * @return 动态集合 + */ + @Override + public R pageDynamicByAdmin(ComActDynVO comActDynVO) { + Page page = new Page<>(); + Long pageNum = comActDynVO.getPageNum(); + Long pageSize = comActDynVO.getPageSize(); + if (null==pageNum||0==pageNum) { + pageNum = 1l; + } + if (null==pageSize||0==pageSize) { + pageSize = 10l; + } + page.setSize(pageSize); + page.setCurrent(pageNum); + IPage<ComActDynVO> iPage = comActDynDAO.pageDynamicByAdmin(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); + } + } -- Gitblit v1.7.1