| | |
| | | public R addPoint(ConvenientElevatingPointDTO convenientElevatingPointDTO) { |
| | | ConvenientElevatingPointDO convenientElevatingPointDO = new ConvenientElevatingPointDO(); |
| | | BeanUtils.copyProperties(convenientElevatingPointDTO,convenientElevatingPointDO); |
| | | ComActDO comActDO = comActDAO.selectById(convenientElevatingPointDTO.getCommunityId()); |
| | | convenientElevatingPointDO.setCommunityName(comActDO.getName()); |
| | | String communityId = convenientElevatingPointDTO.getCommunityId(); |
| | | if (nonNull(communityId)) { |
| | | ComActDO comActDO = comActDAO.selectById(Long.parseLong(communityId.substring(communityId.lastIndexOf(",")+1))); |
| | | if(comActDO!=null){ |
| | | convenientElevatingPointDO.setCommunityName(comActDO.getName()); |
| | | } |
| | | } |
| | | this.baseMapper.insert(convenientElevatingPointDO); |
| | | return R.ok(); |
| | | } |
| | |
| | | if (isNull(convenientElevatingPointDO)) { |
| | | return R.fail("自提点不存在"); |
| | | } |
| | | Long communityId = convenientElevatingPointDTO.getCommunityId(); |
| | | String communityId = convenientElevatingPointDTO.getCommunityId(); |
| | | if (nonNull(communityId)) { |
| | | ComActDO comActDO = comActDAO.selectById(communityId); |
| | | ComActDO comActDO = comActDAO.selectById(Long.parseLong(communityId.substring(communityId.lastIndexOf(",")+1))); |
| | | if(comActDO!=null){ |
| | | convenientElevatingPointDO.setCommunityName(comActDO.getName()); |
| | | } else { |
| | | convenientElevatingPointDO.setCommunityName("西区社区"); |
| | | } |
| | | } |
| | | BeanUtils.copyProperties(convenientElevatingPointDTO, convenientElevatingPointDO); |
| | |
| | | } |
| | | return R.fail("删除失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R detailPoint(Long pointId) { |
| | | ConvenientElevatingPointDO convenientElevatingPointDO = this.baseMapper.selectById(pointId); |
| | | return R.ok(convenientElevatingPointDO); |
| | | } |
| | | } |