Merge branch 'dev-zza' into dev

This commit is contained in:
Lemon
2025-03-25 13:26:20 +08:00
5 changed files with 34 additions and 10 deletions

View File

@@ -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<String> pilePower;
/**
* 站点服务
* 1 - 雨棚
* 2 - 休息室
* 3 - 卫生间
*/
private List<String> stationService;
/**
* 我的收藏
*/

View File

@@ -526,6 +526,9 @@ public class PileStationInfoServiceImpl implements PileStationInfoService {
// 根据前台参数分页
PageHelper.startPage(pageNum, pageSize);
List<PileStationVO> list = pileStationInfoMapper.queryStationInfos(dto);
// 查询该站点是否是该会员收藏的站点
List<String> collectedStationIds = memberStationRelationService.getStationIdListByMemberId(dto.getMemberId());
PageInfo<PileStationVO> pageInfo = new PageInfo<>(list);
List<StationInfoVO> 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) {

View File

@@ -128,6 +128,11 @@ public class StationInfoVO {
*/
private String stationLat;
/**
* 是否已收藏该站点
*/
private boolean collectedFlag;
@Override
public boolean equals(Object o) {
if (this == o) return true;