| | |
| | | DistrictEntity detail = districtService.getOne(Condition.getQueryWrapper(district)); |
| | | return R.data(DistrictWrapper.build().entityVO(detail)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 小区表 自定义获取详情 |
| | | * @param district |
| | | * @return |
| | | */ |
| | | @GetMapping("/getDetail") |
| | | public R<DistrictVO> getDetail(DistrictVO district) { |
| | | return R.data(districtService.getDetail(district)); |
| | | } |
| | | |
| | | /** |
| | | * 小区表 分页 |
| | | */ |
| | |
| | | */ |
| | | @MapKey(value = "id") |
| | | Map<String, TreeStringNode> getDistrictTree(@Param("district") DistrictVO district); |
| | | |
| | | /** |
| | | * 小区表 自定义获取详情 |
| | | * @param district |
| | | * @return |
| | | */ |
| | | DistrictVO getDetail(@Param("district") DistrictVO district); |
| | | } |
| | |
| | | ) |
| | | </select> |
| | | |
| | | <!--小区自定义获取详情查询--> |
| | | <select id="getDetail" resultType="org.springblade.modules.district.vo.DistrictVO"> |
| | | SELECT |
| | | jd.*, |
| | | jda.nei_code as communityCode,jda.nei_name as communityName |
| | | FROM jczz_district jd |
| | | left join jczz_doorplate_address jda on jda.aoi_code = jd.aoi_code |
| | | where jd.is_deleted = 0 |
| | | and jda.address_code = #{district.houseCode} |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | * @return |
| | | */ |
| | | Object getDistrictTree(DistrictVO district); |
| | | |
| | | /** |
| | | * 小区表 自定义获取详情 |
| | | * @param district |
| | | * @return |
| | | */ |
| | | DistrictVO getDetail(DistrictVO district); |
| | | } |
| | |
| | | node.setChildren(null); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 小区表 自定义获取详情 |
| | | * @param district |
| | | * @return |
| | | */ |
| | | @Override |
| | | public DistrictVO getDetail(DistrictVO district) { |
| | | // 小区自定义获取详情查询并返回 |
| | | return baseMapper.getDetail(district); |
| | | } |
| | | } |
| | |
| | | public class DistrictVO extends DistrictEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 地址门牌编号 |
| | | */ |
| | | private String houseCode; |
| | | |
| | | /** |
| | | * 居委会名称 |
| | | */ |
| | | private String communityName; |
| | | |
| | | } |