| | |
| | | housingDemand.setSaleAmount("0-500"); |
| | | } |
| | | if (req.getType()==2){ |
| | | |
| | | this.insertOrUpdate(housingDemand); |
| | | }else{ |
| | | this.insertOrUpdate(housingDemand); |
| | |
| | | if(list.size() > 0){ |
| | | housingDemandDistrictService.insertBatch(list); |
| | | } |
| | | |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 搜索求房源列表数据 |
| | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | HousingDemand housingDemand = this.selectById(id); |
| | | HousingDemandInfoRes housingDemandInfoRes = new HousingDemandInfoRes(); |
| | | AppUser appUser = appUserService.getAppUser(); |
| | | // AppUser appUser = appUserService.getAppUser(); |
| | | housingDemandInfoRes.setId(id); |
| | | housingDemandInfoRes.setDataType(housingDemand.getDataType()); |
| | | housingDemandInfoRes.setQrCode(housingDemand.getQrCode()); |
| | |
| | | int collectionTimes = collectionHousingDemandService.selectCount(new EntityWrapper<CollectionHousingDemand>().eq("housing_demand_id", id)); |
| | | housingDemandInfoRes.setCollectionTimes(collectionTimes); |
| | | housingDemandInfoRes.setCollection(0); |
| | | if(null != appUser){ |
| | | int collection = collectionHousingDemandService |
| | | .selectCount(new EntityWrapper<CollectionHousingDemand>() |
| | | .eq("housing_demand_id", id) |
| | | .eq("app_user_id", appUser.getId())); |
| | | housingDemandInfoRes.setCollection(0 == collection ? 0 : 1); |
| | | } |
| | | // if(null != appUser){ |
| | | // int collection = collectionHousingDemandService |
| | | // .selectCount(new EntityWrapper<CollectionHousingDemand>() |
| | | // .eq("housing_demand_id", id) |
| | | // .eq("app_user_id", appUser.getId())); |
| | | // housingDemandInfoRes.setCollection(0 == collection ? 0 : 1); |
| | | // } |
| | | //添加访问次数记录 |
| | | addViewsNumber(housingDemand); |
| | | // addViewsNumber(housingDemand); |
| | | return housingDemandInfoRes; |
| | | } |
| | | |