From b2fce0dc7dc4ea5dec9792a2bc3ceb9d33d6e07b Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期一, 04 九月 2023 13:59:52 +0800 Subject: [PATCH] 修改后台社区动态加载不出来 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 47 insertions(+), 1 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java index cec6ea6..0b0b137 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java @@ -150,6 +150,51 @@ return R.ok(iPage); } + @Override + public R pageEasyPhotoAdminLC(Long pageNum,Long pageSize) { + Page page = new Page<>(); + if (null == pageNum || 0 == pageNum) { + pageNum = 1l; + } + if (null == pageSize || 0 == pageSize) { + pageSize = 10l; + } + page.setSize(pageSize); + page.setCurrent(pageNum); + IPage<ComActEasyPhotoVO> iPage = comActEasyPhotoDAO.pageEasyPhotoAdminLC(page); + List<ComActEasyPhotoVO> records = iPage.getRecords(); + if (!ObjectUtils.isEmpty(records)) { + records.forEach(comActEasyPhotoVO1 -> { + Long id = comActEasyPhotoVO1.getId(); + + if (comActEasyPhotoVO1.getActivityId() != null + && comActEasyPhotoVO1.getStatus().equals(ComActEasyPhotoDO.status.dpj)) { + // 查询随手拍活动 + ComActEasyPhotoActivityDO photoActivityDO = + comActEasyPhotoActivityMapper.selectById(comActEasyPhotoVO1.getActivityId()); + if (photoActivityDO != null) { + if (comActEasyPhotoVO1.getActivityType() != null) { + if (comActEasyPhotoVO1.getActivityType().equals(ComActEasyPhotoDO.activityType.yz)) { + comActEasyPhotoVO1.setActivityMoney(photoActivityDO.getGoodReward()); + } else if (comActEasyPhotoVO1.getActivityType().equals(ComActEasyPhotoDO.activityType.jl)) { + comActEasyPhotoVO1.setActivityMoney(photoActivityDO.getExcellentReward()); + } else if (comActEasyPhotoVO1.getActivityType().equals(ComActEasyPhotoDO.activityType.pt)) { + comActEasyPhotoVO1.setActivityMoney(photoActivityDO.getOrdinaryReward()); + } else if (comActEasyPhotoVO1.getActivityType().equals(ComActEasyPhotoDO.activityType.yb)) { + comActEasyPhotoVO1.setActivityMoney(photoActivityDO.getCommonlyReward()); + } else if (comActEasyPhotoVO1.getActivityType().equals(ComActEasyPhotoDO.activityType.wu)) { + comActEasyPhotoVO1.setActivityMoney(BigDecimal.ZERO); + } + } + } + } + }); + iPage.setRecords(records); + } + return R.ok(iPage); + } + + /** * 随手拍详情 * @@ -184,7 +229,8 @@ // } // 查询反馈信息 - List<ComActEasyPhotoFeedbackVO> photoFeedbackList = comActEasyPhotoFeedbackMapper.getPhotoFeedbackList(id); + List<ComActEasyPhotoFeedbackVO> photoFeedbackList = + comActEasyPhotoFeedbackMapper.getPhotoFeedbackList(id); if (!photoFeedbackList.isEmpty()) { comActEasyPhotoVO.setPhotoFeedbackList(photoFeedbackList); } -- Gitblit v1.7.1