From a4a3f30fa1868c7c8b823a947a5cda423acce57d Mon Sep 17 00:00:00 2001 From: tangxiaobao <303826152@qq.com> Date: 星期六, 31 七月 2021 10:08:58 +0800 Subject: [PATCH] 防火防汛接口开发 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java | 9 +++++++-- 1 files changed, 7 insertions(+), 2 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 d60ae2a..b9b2ab3 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 @@ -258,7 +258,7 @@ * @return 详情 */ @PostMapping("detailactivity") - public R detailActivity(@RequestParam("id") Long id, @RequestParam("userId") Long userId) { + public R detailActivity(@RequestParam("id") Long id, @RequestParam(value = "userId",required = false) Long userId) { ComActActivityVO comActActivityVO = comActActivityService.inforActivity(id, userId); if (ObjectUtils.isEmpty(comActActivityVO)) { return R.fail("活动不存在"); @@ -379,7 +379,6 @@ return R.fail("未查到社区动态记录"); } // Long id = comActDynVO.getId(); - BeanUtils.copyProperties(comActDynVO, comActDynDO); Integer isTopping = comActDynVO.getIsTopping(); boolean b = isTopping.equals(1); if(b){ @@ -388,6 +387,12 @@ return R.fail("待发布的社区动态不可置顶"); } } + +// if(StringUtils.isEmpty(comActDynVO.getCover())){ +// comActDynVO.setCover(comActDynDO.getCover()); +// } + BeanUtils.copyProperties(comActDynVO, comActDynDO); + boolean update = comActDynService.updateById(comActDynDO); if (update) { // 最多只能设置三条置顶状态,后边设置会取消先前设置的置顶 -- Gitblit v1.7.1