mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
update 小程序首页查询站点列表接口
This commit is contained in:
@@ -75,6 +75,9 @@ public class MemberBasicInfoServiceImpl implements MemberBasicInfoService {
|
||||
@Autowired
|
||||
private PileMerchantInfoService pileMerchantInfoService;
|
||||
|
||||
@Autowired
|
||||
private MemberStationRelationService memberStationRelationService;
|
||||
|
||||
@Autowired
|
||||
private MemberTransactionRecordService memberTransactionRecordService;
|
||||
|
||||
@@ -476,6 +479,15 @@ public class MemberBasicInfoServiceImpl implements MemberBasicInfoService {
|
||||
}
|
||||
vo.setPlateNumberList(plateNumberList);
|
||||
vo.setVinCodeList(vinCodeList);
|
||||
|
||||
// 查询用户收藏的站点
|
||||
List<String> stationIds = memberStationRelationService.getStationIdListByMemberId(memberId);
|
||||
if (CollectionUtils.isEmpty(stationIds)) {
|
||||
vo.setCollectedStationIdList(Lists.newArrayList());
|
||||
}else {
|
||||
vo.setCollectedStationIdList(stationIds);
|
||||
}
|
||||
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
||||
@@ -526,8 +526,6 @@ 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);
|
||||
|
||||
@@ -591,13 +589,6 @@ 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) {
|
||||
|
||||
@@ -90,6 +90,11 @@ public class MemberVO {
|
||||
*/
|
||||
private List<String> vinCodeList;
|
||||
|
||||
/**
|
||||
* 用户收藏的站点idList
|
||||
*/
|
||||
private List<String> collectedStationIdList;
|
||||
|
||||
/**
|
||||
* 头像地址
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user