From f917fc4d42481ea072bef864ace63d9572b89bb5 Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期三, 25 八月 2021 16:14:11 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/test' into test --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+), 0 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java index 64ba0ec..b1cb57b 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java @@ -90,6 +90,8 @@ private ComEldersAuthHistoryRecordMapper comEldersAuthHistoryRecordMapper; @Resource private ComActEasyPhotoActivityService comActEasyPhotoActivityService; + @Resource + private ComActActEvaluateService comActActEvaluateService; /** * 新增社区活动 @@ -279,6 +281,7 @@ if (ObjectUtils.isEmpty(comActActivityVO)) { return R.fail("活动不存在"); } + //活动奖品 List<ComActActPrizeDO> comActActPrizeDOS = comActActPrizeService .list(new QueryWrapper<ComActActPrizeDO>().lambda().eq(ComActActPrizeDO::getActivityId, id)); if (!ObjectUtils.isEmpty(comActActPrizeDOS)) { @@ -290,6 +293,21 @@ }); comActActivityVO.setComActActPrizeVOList(comActActPrizeVOS); } + //活动评价 + List<ComActActEvaluateDO> comActActEvaluateDOList = comActActEvaluateService + .list(new QueryWrapper<ComActActEvaluateDO>().lambda().eq(ComActActEvaluateDO::getActivityId, id)); + if (!ObjectUtils.isEmpty(comActActEvaluateDOList)) { + List<ComActActEvaluateVO> comActActEvaluateVOList = new ArrayList<>(); + comActActEvaluateDOList.forEach(comActActEvaluateDO -> { + ComActActEvaluateVO comActActEvaluateVO = new ComActActEvaluateVO(); + BeanUtils.copyProperties(comActActEvaluateDO, comActActEvaluateVO); + comActActEvaluateVOList.add(comActActEvaluateVO); + }); + comActActivityVO.setComActActEvaluateVOList(comActActEvaluateVOList); + //活动评价总数 + comActActivityVO.setEvaluateAmount(comActActEvaluateDOList.size()); + } + //活动报名名单 ActivitySignVO activitySignVO = new ActivitySignVO(); activitySignVO.setActivityId(id); R r = comActActivityService.listActivitySigns(activitySignVO); @@ -354,6 +372,42 @@ } /** + * description listActivityRegists 分页查询活动评价 + * @param comActActEvaluateVO 活动评价vo + * @return R 分页查询结果 + * @author txb + * @date 2021/8/24 14:03 + */ + @PostMapping("activity/evaluate/page") + public R pageActivityEvaluates(@RequestBody ComActActEvaluateVO comActActEvaluateVO) { + return comActActivityService.pageActivityEvaluates(comActActEvaluateVO); + } + + /** + * description pageActivityRegists 分页查询活动签到 + * @param comActActRegistVO 活动签到vo + * @return R 分页查询结果 + * @author txb + * @date 2021/8/24 14:03 + */ + @PostMapping("activity/regist/page") + public R pageActivityRegists(@RequestBody ComActActRegistVO comActActRegistVO) { + return comActActivityService.pageActivityRegists(comActActRegistVO); + } + + /** + * description getEvaluateListsByIds 批量查询活动评价 + * @param ids ids + * @return R 查询结果 + * @author txb + * @date 2021/8/24 14:03 + */ + @PostMapping("/activity/evaluate/getList") + public R getEvaluateListsByIds(@RequestBody List<Long> ids){ + return comActActivityService.getEvaluateListsByIds(ids); + } + + /** * 新增社区动态 * * @param comActDynVO -- Gitblit v1.7.1