|
|
@ -569,6 +569,15 @@ public class AreaCodeServiceImpl extends BaseServiceImpl<AreaCodeDao, AreaCodeEn |
|
|
|
**/ |
|
|
|
@Override |
|
|
|
public AddAreaCodeDictResultDTO addStreetCommAreaCode(AddAreaCodeDictFormDTO formDTO) { |
|
|
|
if (StringUtils.isNotBlank(formDTO.getCode())) { |
|
|
|
AreaCodeChildDTO areaCodeChildDTO = childDao.selectByCode(formDTO.getCode().trim()); |
|
|
|
if (null == areaCodeChildDTO) { |
|
|
|
throw new RenException("code不存在"); |
|
|
|
} |
|
|
|
areaCodeChildDTO.setName(formDTO.getName().trim()); |
|
|
|
areaCodeChildService.update(areaCodeChildDTO); |
|
|
|
return new AddAreaCodeDictResultDTO(areaCodeChildDTO.getCode()); |
|
|
|
} |
|
|
|
AreaCodeChildDTO parent = childDao.selectByCode(formDTO.getParentAreaCode().trim()); |
|
|
|
if (null == parent) { |
|
|
|
throw new RenException("parentAreaCode不存在"); |
|
|
|