|
@@ -374,26 +374,29 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
|
374
|
374
|
}
|
375
|
375
|
|
376
|
376
|
@Override
|
377
|
|
- public ResponseBean getWxBuildingList(Integer pageNum, Integer pageSize, String name, List<String> targets,Integer cityId,boolean mine) {
|
|
377
|
+ public ResponseBean getWxBuildingList(Integer pageNum, Integer pageSize, String name, List<String> targets,Integer cityId,boolean mine, String doorModel, Integer buildingTypeId) {
|
378
|
378
|
IPage<TaBuilding> page = new Page<>(pageNum, pageSize);
|
379
|
379
|
|
380
|
|
- QueryWrapper<TaBuilding> buildingQueryWrapper = new QueryWrapper<>();
|
381
|
|
- buildingQueryWrapper.nested(null != name && !"".equals(name.trim()), i -> i.like("name", name).or().like("building_name", name));
|
382
|
|
- buildingQueryWrapper.eq("status", 1);
|
383
|
|
- buildingQueryWrapper.eq(null != cityId && cityId != 0,"city_id", cityId);
|
384
|
|
- buildingQueryWrapper.in(null != targets && targets.size() > 0, "building_id", targets);
|
385
|
|
-// buildingQueryWrapper.like(null != name && !"".equals(name.trim()), "name", name);
|
386
|
|
- buildingQueryWrapper.orderByAsc("order_no");
|
|
380
|
+// QueryWrapper<TaBuilding> buildingQueryWrapper = new QueryWrapper<>();
|
|
381
|
+// buildingQueryWrapper.nested(null != name && !"".equals(name.trim()), i -> i.like("name", name).or().like("building_name", name));
|
|
382
|
+// buildingQueryWrapper.eq("status", 1);
|
|
383
|
+// buildingQueryWrapper.eq(null != cityId && cityId != 0,"city_id", cityId);
|
|
384
|
+// buildingQueryWrapper.in(null != targets && targets.size() > 0, "building_id", targets);
|
|
385
|
+//// buildingQueryWrapper.like(null != name && !"".equals(name.trim()), "name", name);
|
|
386
|
+// buildingQueryWrapper.orderByAsc("order_no");
|
|
387
|
+// buildingQueryWrapper.eq(null != buildingTypeId,"building_type", buildingTypeId);
|
|
388
|
+//
|
|
389
|
+// IPage<TaBuilding> result = taBuildingMapper.selectPage(page, buildingQueryWrapper);
|
387
|
390
|
|
388
|
|
- IPage<TaBuilding> result = taBuildingMapper.selectPage(page, buildingQueryWrapper);
|
|
391
|
+ IPage<TaBuilding> result = taBuildingMapper.selectBuildingPage(page, name, cityId, targets, doorModel,buildingTypeId);
|
389
|
392
|
|
390
|
393
|
List<TaBuilding> buildingList = result.getRecords();
|
391
|
|
- if (null != buildingList && buildingList.size() > 0) {
|
|
394
|
+ if (CollectionUtils.isNotEmpty(buildingList)) {
|
392
|
395
|
for (TaBuilding build:buildingList) {
|
393
|
396
|
getBuildingAttaches(build);
|
394
|
397
|
}
|
395
|
398
|
}
|
396
|
|
- if(null!=targets&&targets.size()<=0 && mine){
|
|
399
|
+ if(CollectionUtils.isEmpty(targets) && mine){
|
397
|
400
|
return ResponseBean.success(null);
|
398
|
401
|
}else {
|
399
|
402
|
return ResponseBean.success(result);
|