update 查询用户常去站点方法

This commit is contained in:
Lemon
2025-04-07 15:01:16 +08:00
parent a885bdfbb0
commit 9c278b05d1
10 changed files with 68 additions and 55 deletions

View File

@@ -403,14 +403,4 @@ public interface OrderBasicInfoMapper {
* @return
*/
List<OrderVO> selectThirdPartyOrderList(@Param("dto") QueryStartChargeDTO dto);
/**
* 查询用户常用站点信息
* @param memberId
* @param startTime
* @param endTime
* @return
*/
List<UserFrequentedStationInfo> queryUserFrequentedStation(@Param("memberId") String memberId ,@Param("startTime") String startTime ,@Param("endTime") String endTime);
}

View File

@@ -1,6 +1,7 @@
package com.jsowell.pile.mapper;
import com.jsowell.pile.domain.PileStationInfo;
import com.jsowell.pile.domain.UserFrequentedStationInfo;
import com.jsowell.pile.dto.QueryStationDTO;
import com.jsowell.pile.dto.QueryStationInfoDTO;
import com.jsowell.pile.dto.amap.GetStationInfoDTO;
@@ -122,4 +123,13 @@ public interface PileStationInfoMapper {
PileStationInfo queryInfoByDeptId(@Param("deptId") String deptId);
List<PileStationInfo> getStationInfosByMerchantIds(@Param("list") List<String> merchantIds);
/**
* 查询用户常用站点信息
* @param memberId
* @param startTime
* @param endTime
* @return
*/
List<UserFrequentedStationInfo> queryUserFrequentedStation(@Param("memberId") String memberId ,@Param("startTime") String startTime ,@Param("endTime") String endTime);
}

View File

@@ -544,13 +544,6 @@ public interface OrderBasicInfoService{
void retryRefundOrderList(List<String> orderCoderList);
/**
* 查询用户常用充电站点信息
* @param memberId
* @return
*/
List<UserFrequentedStationInfo> queryUserFrequentedStation(String memberId);
/**
* 通过订单编号列表查询订单信息
* @param orderCodeList

View File

@@ -2,6 +2,7 @@ package com.jsowell.pile.service;
import com.jsowell.common.core.page.PageResponse;
import com.jsowell.pile.domain.PileStationInfo;
import com.jsowell.pile.domain.UserFrequentedStationInfo;
import com.jsowell.pile.dto.*;
import com.jsowell.pile.dto.amap.GetStationInfoDTO;
import com.jsowell.pile.dto.business.StationBusinessAnalyzeInfoDTO;
@@ -203,4 +204,11 @@ public interface PileStationInfoService {
* @return
*/
StationBusinessAnalyzeInfoVO getStationConnectorUsedInfo(StationBusinessAnalyzeInfoDTO dto);
/**
* 查询用户常用充电站点信息
* @param dto
* @return
*/
PageResponse queryUserFrequentedStation(QueryStationDTO dto);
}

View File

@@ -4970,18 +4970,6 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
}
/**
* 查询用户常用站点信息
* @param memberId
* @return
*/
@Override
public List<UserFrequentedStationInfo> queryUserFrequentedStation(String memberId) {
String endTime = DateUtils.getDate();
String startTime = DateUtils.getHalfYearAgo(endTime);
return orderBasicInfoMapper.queryUserFrequentedStation(memberId, startTime, endTime);
}
@Override
public List<AfterSettleOrderDTO> queryAfterSettleOrderDTOList(List<String> orderCodeList) {
return null;

View File

@@ -16,10 +16,7 @@ import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.util.*;
import com.jsowell.common.util.ip.AddressUtils;
import com.jsowell.pile.domain.PileBasicInfo;
import com.jsowell.pile.domain.PileStationInfo;
import com.jsowell.pile.domain.SettleOrderReport;
import com.jsowell.pile.domain.ThirdpartyParkingConfig;
import com.jsowell.pile.domain.*;
import com.jsowell.pile.dto.FastCreateStationDTO;
import com.jsowell.pile.dto.QueryStationDTO;
import com.jsowell.pile.dto.QueryStationInfoDTO;
@@ -1394,4 +1391,24 @@ public class PileStationInfoServiceImpl implements PileStationInfoService {
vo.setBusinessOrderDetailInfoVOList(list);
return vo;
}
/**
* 查询用户常用站点信息
* @param dto
* @return
*/
@Override
public PageResponse queryUserFrequentedStation(QueryStationDTO dto) {
String endTime = DateUtils.getDate();
String startTime = DateUtils.getHalfYearAgo(endTime);
List<UserFrequentedStationInfo> frequentedStationInfos = pileStationInfoMapper.queryUserFrequentedStation(dto.getMemberId(), startTime, endTime);
// 筛选出站点idList
List<String> stationIdList = frequentedStationInfos.stream()
.map(UserFrequentedStationInfo::getStationId)
.collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(stationIdList)) {
dto.setStationIds(stationIdList);
}
return uniAppQueryStationInfoListV2(dto);
}
}