44323
2024-04-30 eba7ff322d676102b70058b26cfcffefdc22b53e
guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/HouseResourceService.java
@@ -134,24 +134,6 @@
            }
            // 根据用户历史搜索 推荐对应的区域
        }
//        if(StringUtils.hasLength(req.getDistrict())){
//            cityIds = new ArrayList<>();
//            districtIds = new ArrayList<>();
//            JSONArray jsonArray = JSON.parseArray(req.getDistrict());
//            for (int i = 0; i < jsonArray.size(); i++) {
//                JSONObject jsonObject = jsonArray.getJSONObject(i);
//                Integer cityId = jsonObject.getInteger("cityId");
//                Integer districtId = jsonObject.getInteger("districtId");
//                //不限区域
//                if(0 == districtId || null == districtId){
//                    List<Region> regions = regionService.selectList(new EntityWrapper<Region>().eq("parent_id", cityId));
//                    districtIds.addAll(regions.stream().map(Region::getId).collect(Collectors.toList()));
//                }
//                cityIds.add(cityId);
//                districtIds.add(districtId);
//            }
//        }
        //价格范围
        Double saleAmountStart = null;
        Double saleAmountEnd = null;
@@ -185,7 +167,6 @@
        }
        SearchHouseResourceRes searchHouseResource = new SearchHouseResourceRes();
        List<SearchHouseResourceListRes> searchHouseResourceListRes = this.baseMapper.searchHouseResource(req, cityIds, districtIds, saleAmountStart, saleAmountEnd, houseModels, houseTypeIds);
        // 如果有根据用户历史来搜索必看 如果没有搜索出数据 那么查询所有必看
        if (req.getDataType()!=null&&req.getDataType()==1 && (!StringUtils.hasLength(req.getDistrict()))