|
@@ -8,6 +8,7 @@ import com.huiju.estateagents.common.CommConstant;
|
8
|
8
|
import com.huiju.estateagents.entity.*;
|
9
|
9
|
import com.huiju.estateagents.po.TaHousingResourcesPO;
|
10
|
10
|
import com.huiju.estateagents.service.*;
|
|
11
|
+import org.apache.commons.lang3.StringUtils;
|
11
|
12
|
import org.slf4j.Logger;
|
12
|
13
|
import org.slf4j.LoggerFactory;
|
13
|
14
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.*;
|
15
|
16
|
import org.springframework.web.multipart.MultipartFile;
|
16
|
17
|
|
17
|
18
|
import javax.servlet.http.HttpServletRequest;
|
|
19
|
+import java.util.ArrayList;
|
18
|
20
|
import java.util.List;
|
19
|
21
|
import java.util.stream.Collectors;
|
20
|
22
|
|
|
@@ -47,6 +49,12 @@ public class TaHousingResourcesController extends BaseController {
|
47
|
49
|
@Autowired
|
48
|
50
|
private ITaRaiseHouseService taRaiseHouseService;
|
49
|
51
|
|
|
52
|
+ @Autowired
|
|
53
|
+ public ITaBuildingApartmentService taBuildingApartmentService;
|
|
54
|
+
|
|
55
|
+ @Autowired
|
|
56
|
+ public ITaBuildingImgService taBuildingImgService;
|
|
57
|
+
|
50
|
58
|
/**
|
51
|
59
|
* 分页查询列表
|
52
|
60
|
*
|
|
@@ -272,6 +280,19 @@ public class TaHousingResourcesController extends BaseController {
|
272
|
280
|
}
|
273
|
281
|
}
|
274
|
282
|
});
|
|
283
|
+
|
|
284
|
+ //塞入户型信息
|
|
285
|
+ if (!StringUtils.isEmpty(e.getApartmentId())) {
|
|
286
|
+ TaBuildingApartment buildingApartment = taBuildingApartmentService.getById(e.getApartmentId());
|
|
287
|
+ e.setApartmentName(buildingApartment.getApartmentName());
|
|
288
|
+ e.setInsideArea(buildingApartment.getInsideArea());
|
|
289
|
+ e.setBuildingArea(buildingApartment.getBuildingArea());
|
|
290
|
+ //塞入户型图信息
|
|
291
|
+ List<String> apartMentIds = new ArrayList<>();
|
|
292
|
+ apartMentIds.add(e.getApartmentId());
|
|
293
|
+ List<TaBuildingImg> apartMentList = taBuildingImgService.getAparemnetList(apartMentIds);
|
|
294
|
+ e.setApartmentImgList(apartMentList);
|
|
295
|
+ }
|
275
|
296
|
});
|
276
|
297
|
|
277
|
298
|
responseBean.addSuccess(taHousingResourcesPOList);
|