springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/convenient/ConvenientElevatingPointDTO.java
@@ -62,7 +62,7 @@ @ApiModelProperty(value = "所属社区id") @NotNull(groups = {AddGroup.class}, message = "所属社区id不能为空") private Long communityId; private String communityId; @ApiModelProperty(value = "创建人", hidden = true) private Long createdBy; springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/convenient/ConvenientElevatingPointVO.java
@@ -30,7 +30,7 @@ * 社区id */ @ApiModelProperty("社区id") private Long communityId; private String communityId; /** * 社区名称 */ springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ConvenientElevatingPointDO.java
@@ -31,7 +31,7 @@ /** * 社区id */ private Long communityId; private String communityId; /** * 社区名称 */ springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientElevatingPointServiceImpl.java
@@ -65,8 +65,13 @@ public R addPoint(ConvenientElevatingPointDTO convenientElevatingPointDTO) { ConvenientElevatingPointDO convenientElevatingPointDO = new ConvenientElevatingPointDO(); BeanUtils.copyProperties(convenientElevatingPointDTO,convenientElevatingPointDO); ComActDO comActDO = comActDAO.selectById(convenientElevatingPointDTO.getCommunityId()); String communityId = convenientElevatingPointDTO.getCommunityId(); if (nonNull(communityId)) { ComActDO comActDO = comActDAO.selectById(Long.parseLong(communityId.substring(communityId.lastIndexOf(",")))); if(comActDO!=null){ convenientElevatingPointDO.setCommunityName(comActDO.getName()); } } this.baseMapper.insert(convenientElevatingPointDO); return R.ok(); } @@ -84,13 +89,11 @@ 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(",")))); if(comActDO!=null){ convenientElevatingPointDO.setCommunityName(comActDO.getName()); } else { convenientElevatingPointDO.setCommunityName("西区社区"); } } BeanUtils.copyProperties(convenientElevatingPointDTO, convenientElevatingPointDO); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComConvenientElevatingPointMapper.xml
@@ -5,7 +5,7 @@ <!--@Table com_convenient_elevating_point--> <id column="id" jdbcType="BIGINT" property="id"/> <result column="name" jdbcType="VARCHAR" property="name"/> <result column="community_id" jdbcType="BIGINT" property="communityId"/> <result column="community_id" jdbcType="VARCHAR" property="communityId"/> <result column="community_name" jdbcType="VARCHAR" property="communityName"/> <result column="address" jdbcType="VARCHAR" property="address"/> <result column="contacts" jdbcType="VARCHAR" property="contacts"/>