Parcourir la source

feat(pricePolicy): 支持根据充电站状态筛选站点信息

- 在查询参数中新增充电站状态字段
- 在查询逻辑中增加充电站状态条件过滤
- 实现根据状态筛选充电站的分页查询功能
SheepHy il y a 3 jours
Parent
commit
dd4f7e7791

+ 3 - 0
src/main/java/com/zsElectric/boot/business/model/query/PricePolicyPageQuery.java

@@ -20,4 +20,7 @@ public class PricePolicyPageQuery extends BasePageQuery {
     @Schema(description = "充电站名称", example = "轩宇智慧停车场")
     private String stationName;
 
+    @Schema(description = "充电站状态", example = "1")
+    private Integer stationStatus;
+
 }

+ 3 - 0
src/main/java/com/zsElectric/boot/business/service/impl/PricePolicyManagementServiceImpl.java

@@ -69,6 +69,9 @@ public class PricePolicyManagementServiceImpl implements PricePolicyManagementSe
         if (StringUtils.hasText(query.getStationName())) {
             queryWrapper.like(ThirdPartyStationInfo::getStationName, query.getStationName());
         }
+        if (query.getStationStatus() != null) {
+            queryWrapper.eq(ThirdPartyStationInfo::getStationStatus, query.getStationStatus());
+        }
         
         Page<ThirdPartyStationInfo> stationPage = stationInfoMapper.selectPage(
                 new Page<>(query.getPageNum(), query.getPageSize()),