From c4439a059b04ae50c5d12dc08aaaddff31b0f05f Mon Sep 17 00:00:00 2001 From: Lemon Date: Tue, 25 Mar 2025 13:24:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?update=20=20=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=9F=A5=E8=AF=A2=E7=AB=99=E7=82=B9=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=8E=A5=E5=8F=A3=E6=96=B0=E5=A2=9E=E6=94=B6=E8=97=8F?= =?UTF-8?q?=E6=A0=87=E8=AF=86=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsowell/api/uniapp/customer/PileController.java | 2 ++ .../pile/service/impl/PileStationInfoServiceImpl.java | 10 ++++++++++ .../java/com/jsowell/pile/vo/base/StationInfoVO.java | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/jsowell-admin/src/main/java/com/jsowell/api/uniapp/customer/PileController.java b/jsowell-admin/src/main/java/com/jsowell/api/uniapp/customer/PileController.java index 706f1854e..b0139f7ee 100644 --- a/jsowell-admin/src/main/java/com/jsowell/api/uniapp/customer/PileController.java +++ b/jsowell-admin/src/main/java/com/jsowell/api/uniapp/customer/PileController.java @@ -84,6 +84,8 @@ public class PileController extends BaseController { List deptIds = pileMerchantInfoService.getDeptIdsByAppId(appId); queryStationDTO.setMerchantDeptIds(deptIds); } + // 获取memberId + queryStationDTO.setMemberId(getMemberIdByAuthorization(request)); logger.debug("uniApp查询充电站信息appId:{}, dto:{}", appId, JSON.toJSONString(queryStationDTO)); PageResponse pageResponse = pileStationInfoService.uniAppQueryStationInfoList(queryStationDTO); response = new RestApiResponse<>(pageResponse); diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileStationInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileStationInfoServiceImpl.java index 9e83531e0..f737f2a48 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileStationInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileStationInfoServiceImpl.java @@ -526,6 +526,9 @@ public class PileStationInfoServiceImpl implements PileStationInfoService { // 根据前台参数分页 PageHelper.startPage(pageNum, pageSize); List list = pileStationInfoMapper.queryStationInfos(dto); + // 查询该站点是否是该会员收藏的站点 + List collectedStationIds = memberStationRelationService.getStationIdListByMemberId(dto.getMemberId()); + PageInfo pageInfo = new PageInfo<>(list); List stationVOList = Lists.newArrayList(); @@ -588,6 +591,13 @@ public class PileStationInfoServiceImpl implements PileStationInfoService { stationVO.setVipTotalPrice(currentTimePriceDetails.getVipTotalPrice()); } stationVOList.add(stationVO); + + if (collectedStationIds.contains(stationVO.getStationId())) { + // 如果收藏的列表中有该站点的id,则返回 true + stationVO.setCollectedFlag(Boolean.TRUE); + }else { + stationVO.setCollectedFlag(Boolean.FALSE); + } } if (distance != 0.00) { diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/vo/base/StationInfoVO.java b/jsowell-pile/src/main/java/com/jsowell/pile/vo/base/StationInfoVO.java index a578528ee..eace4ffa5 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/vo/base/StationInfoVO.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/vo/base/StationInfoVO.java @@ -128,6 +128,11 @@ public class StationInfoVO { */ private String stationLat; + /** + * 是否已收藏该站点 + */ + private boolean collectedFlag; + @Override public boolean equals(Object o) { if (this == o) return true; From d6e4131adfb2ad943c5ff18eaa1bc21d0ca873d7 Mon Sep 17 00:00:00 2001 From: Lemon Date: Tue, 25 Mar 2025 13:25:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?update=20=20=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=9F=A5=E8=AF=A2=E7=AB=99=E7=82=B9=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=8E=A5=E5=8F=A3=E6=96=B0=E5=A2=9E=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/jsowell/pile/dto/QueryStationDTO.java | 17 +++++++++-------- .../mapper/pile/PileStationInfoMapper.xml | 10 ++++++++-- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/dto/QueryStationDTO.java b/jsowell-pile/src/main/java/com/jsowell/pile/dto/QueryStationDTO.java index 06ca44166..6451b1907 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/dto/QueryStationDTO.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/dto/QueryStationDTO.java @@ -127,10 +127,19 @@ public class QueryStationDTO extends BaseEntity { private String memberId; + /** + * 是否有雨棚 + */ private String canopyFlag; + /** + * 是否有道闸 + */ private String barrierFlag; + /** + * 是否有地锁 + */ private String parkingLockFlag; @Data @@ -150,14 +159,6 @@ public class QueryStationDTO extends BaseEntity { */ private List pilePower; - /** - * 站点服务 - * 1 - 雨棚 - * 2 - 休息室 - * 3 - 卫生间 - */ - private List stationService; - /** * 我的收藏 */ diff --git a/jsowell-pile/src/main/resources/mapper/pile/PileStationInfoMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/PileStationInfoMapper.xml index 8589a724f..9c0569a60 100644 --- a/jsowell-pile/src/main/resources/mapper/pile/PileStationInfoMapper.xml +++ b/jsowell-pile/src/main/resources/mapper/pile/PileStationInfoMapper.xml @@ -370,8 +370,14 @@ and t1.address like concat('%', #{stationDTO.address,jdbcType=VARCHAR}, '%') - - and t1.station_tel = #{stationDTO.stationTel,jdbcType=VARCHAR} + + and t1.canopy_flag = #{stationDTO.canopyFlag,jdbcType=VARCHAR} + + + and t1.barrier_flag = #{stationDTO.barrierFlag,jdbcType=VARCHAR} + + + and t1.parking_lock_flag = #{stationDTO.parkingLockFlag,jdbcType=VARCHAR}