|
@@ -85,6 +85,9 @@ public class HouseController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private UserUtils userUtils;
|
|
private UserUtils userUtils;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private UserService2 userService2;
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -424,7 +427,21 @@ public class HouseController extends BaseController {
|
|
List<ImageEntity> images = imageService2.findByHouseIdAndFloor(houseId, floor);
|
|
List<ImageEntity> images = imageService2.findByHouseIdAndFloor(houseId, floor);
|
|
if(null != house){
|
|
if(null != house){
|
|
house.setImages(images);
|
|
house.setImages(images);
|
|
- return new R(MsgCode.SUCCESS_CODE, house);
|
|
|
|
|
|
+ HouseResponse houseResponse = new HouseResponse();
|
|
|
|
+ BeanUtils.copyProperties(house , houseResponse);
|
|
|
|
+ if(null != house.getUserId()){
|
|
|
|
+ UserEntity uploader = userService2.findById(house.getUserId());
|
|
|
|
+ if(null != uploader){
|
|
|
|
+ houseResponse.setUploadName(uploader.getRealName());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(null != house.getHandler()){
|
|
|
|
+ UserEntity handler = userService2.findById(house.getHandler());
|
|
|
|
+ if(null != handler){
|
|
|
|
+ houseResponse.setHandlerName(handler.getRealName());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return new R(MsgCode.SUCCESS_CODE, houseResponse);
|
|
}else{
|
|
}else{
|
|
return new R(MsgCode.ERROR_CODE, "房源不存在");
|
|
return new R(MsgCode.ERROR_CODE, "房源不存在");
|
|
}
|
|
}
|