springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/user/AdministratorsUserVO.java
@@ -79,4 +79,7 @@ @ApiModelProperty(value = "商铺Id") private String shopStorePhone; @ApiModelProperty(value = "用户昵称") private String nickName; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -34,6 +34,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import java.util.List; /** @@ -2427,4 +2428,12 @@ @PostMapping("/neighbor/neighborCommentReplyByApp") R neighborCommentReplyByApp(@RequestBody ComActNeighborCommentReplyAppDTO commentReplyAppDTO); /** * 实有房屋_编辑 * @param villageId 实有房屋id * @param comMngVillageVO 请求参数 * @return */ @PostMapping("/editvillage/{villageId}") R editvillage(@PathVariable("villageId") Long villageId,@RequestBody ComMngVillageVO comMngVillageVO); } springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/VillageApi.java
@@ -98,4 +98,14 @@ return R.ok(); } @ApiOperation(value = "编辑实有房屋", response = ComMngVillageVO.class) @PostMapping("editvillage/{villageId}") public R editvillage(@PathVariable("villageId")Long villageId,@Valid @RequestBody ComMngVillageVO comMngVillageVO) { LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); Long communityId = loginUserInfo.getCommunityId(); comMngVillageVO.setCommunityId(communityId); return communityService.editvillage(villageId,comMngVillageVO); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComMngVillageApi.java
@@ -2,7 +2,6 @@ import com.panzhihua.common.model.dtos.community.PageComMngVillageDTO; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComMngCarExcelVO; import com.panzhihua.common.model.vos.community.ComMngVillageServeExcelVO; import com.panzhihua.common.model.vos.community.ComMngVillageVO; import com.panzhihua.service_community.service.ComMngVillageService; @@ -71,6 +70,7 @@ return R.ok(r); } /** * 社区后台导入实有房屋 * @param list 数据 @@ -83,4 +83,15 @@ return comMngVillageService.listSaveVillage(list,communityId); } /** * 编辑实有房屋 * @param villageId 动态id * @return 删除结果 */ @PostMapping("editvillage/{villageId}") @Transactional(rollbackFor = Exception.class) public R editvillage(@PathVariable("villageId")Long villageId,@Valid @RequestBody ComMngVillageVO comMngVillageVO) { return comMngVillageService.editVillage(villageId,comMngVillageVO); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/NeighborApi.java
@@ -182,6 +182,7 @@ * @param vo 请求参数 */ @PostMapping("changeCommentStatusByAdmin") @Transactional(rollbackFor = Exception.class) public R changeCommentStatusByAdmin(@RequestBody ChangeCommentStatusByAdminVO vo) { return comActNeighborCircleService.changeCommentStatusByAdmin(vo); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActNeighborCircleService.java
@@ -107,7 +107,7 @@ R detailNeighborCommentReply(Long id); /** * 评论的状态_修改 * 评论的回复状态_修改 * @param changeStatusReplyVO * @return */ springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngVillageService.java
@@ -47,4 +47,12 @@ * @return */ R listSaveVillage(List<ComMngVillageServeExcelVO> list, Long communityId); /** * 实有房屋编辑 * @param villageId * @param comMngVillageVO * @return */ R editVillage(Long villageId, ComMngVillageVO comMngVillageVO); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
@@ -591,7 +591,8 @@ AdministratorsUserVO user = this.baseMapper.selectUserByUserId(commentDO.getUserId()); ComActNeighborCommentByAdminVO vo = new ComActNeighborCommentByAdminVO(); BeanUtils.copyProperties(commentDO,vo); vo.setUserName(user.getName()); String name = user.getName()==null?user.getNickName():user.getName(); vo.setUserName(name); return R.ok(vo); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java
@@ -14,9 +14,7 @@ import com.panzhihua.service_community.dao.ComActDAO; import com.panzhihua.service_community.dao.ComActVillageDAO; import com.panzhihua.service_community.dao.ComMngPopulationDAO; import com.panzhihua.service_community.dao.ComMngVolunteerMngDAO; import com.panzhihua.service_community.model.dos.ComActDO; import com.panzhihua.service_community.model.dos.ComActDiscussDO; import com.panzhihua.service_community.model.dos.ComMngPopulationDO; import com.panzhihua.service_community.model.dos.ComMngVillageDO; import com.panzhihua.service_community.service.ComMngVillageService; @@ -25,10 +23,7 @@ import javax.annotation.Resource; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; /** * @author: llming @@ -160,4 +155,24 @@ this.saveBatch(comMngVillageDOS); return R.ok("共计导入实有房屋数量:" + comMngVillageDOS.size()); } @Override public R editVillage(Long villageId, ComMngVillageVO comMngVillageVO) { ComMngVillageDO comMngVillageDO = this.baseMapper.selectById(villageId); if (comMngVillageDO == null) { return R.fail("id有误!"); } BeanUtils.copyProperties(comMngVillageVO, comMngVillageDO); ComActDO comActDO = comActDAO.selectById(comMngVillageDO.getCommunityId()); if (comActDO == null || comActDO.getStreetId() == null) { return R.fail("社区没有绑定街道,请绑定后操作!"); } comMngVillageDO.setStreetId(comActDO.getStreetId()); int update = this.baseMapper.update(comMngVillageDO, new LambdaQueryWrapper<ComMngVillageDO>() .eq(ComMngVillageDO::getVillageId, villageId)); if(update>0){ return R.ok(comMngVillageVO); } return R.fail(); } }