Commit 7ee830c6 authored by lixuan's avatar lixuan

feat: 房源

parent 73c05969
Pipeline #143947 failed with stages
in 30 minutes and 36 seconds
......@@ -65,8 +65,8 @@ public class HouseResourceController {
}
@GetMapping("/businessEntityStatistics")
public AjaxResult getBusinessEntityStatistics(@RequestParam(required = false) String two) {
return AjaxResult.success(houseResourceService.businessEntityStatistics(two));
public AjaxResult getBusinessEntityStatistics(@RequestParam(required = false) String two, @RequestParam(required = false) String three) {
return AjaxResult.success(houseResourceService.businessEntityStatistics(two, three));
}
@PostMapping("/page/businessEntityStatistics")
......
......@@ -24,7 +24,7 @@ public interface HouseResourceService {
List<HouseResourcePage> listHouseResources(HouseResourcePageQuery query);
BusinessEntityStatisticsDetail businessEntityStatistics(String two);
BusinessEntityStatisticsDetail businessEntityStatistics(String two, String three);
PageBusinessEntityStatisticsDetail pageBusinessEntityStatistics(PageBusinessEntityStatisticsQuery query);
}
......@@ -208,7 +208,7 @@ public class HouseResourceServiceImpl implements HouseResourceService {
}
@Override
public BusinessEntityStatisticsDetail businessEntityStatistics(String two) {
public BusinessEntityStatisticsDetail businessEntityStatistics(String two, String three) {
List<HouseResource> list = houseResourceMapper.selectAll();
if (CollectionUtils.isEmpty(list)) {
return new BusinessEntityStatisticsDetail();
......@@ -217,6 +217,9 @@ public class HouseResourceServiceImpl implements HouseResourceService {
if (StringUtils.hasText(two)) {
list = list.stream().filter(x -> x.getTwo().equals(two)).collect(Collectors.toList());
}
if (StringUtils.hasText(three)) {
list = list.stream().filter(x -> x.getThree().equals(three)).collect(Collectors.toList());
}
if (CollectionUtils.isEmpty(list)) {
return businessEntityStatisticsDetail;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment