From 38ae6000623fa19bbc69d9d60f963a621e6ff201 Mon Sep 17 00:00:00 2001
From: yyy <1083599556@qq.com>
Date: 星期一, 27 四月 2026 09:40:14 +0800
Subject: [PATCH] 1.调试接口 修改bug 2.完成微信通知发送功能完成(活动模块需要调用用户优惠卷接口)
---
xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/impl/XpPricingServiceImpl.java | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/impl/XpPricingServiceImpl.java b/xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/impl/XpPricingServiceImpl.java
index a1d7dc1..096f76f 100644
--- a/xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/impl/XpPricingServiceImpl.java
+++ b/xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/impl/XpPricingServiceImpl.java
@@ -1,6 +1,7 @@
package com.xiaopeng.itinerary.service.impl;
+import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.lang.Snowflake;
import com.alibaba.fastjson2.JSON;
@@ -142,6 +143,8 @@
private UserRoutePlanRuleClient userRoutePlanRuleClient;
@Resource
private XpTargetedServiceClient xpTargetedServiceClient;
+ @Resource
+ private XpTradingStrategyClient xpTradingStrategyClient;
@Resource(name = "hutoolSnowflake")
private Snowflake snowflake;
@@ -569,7 +572,7 @@
// 判断是否有进行的订单
R<Long> r = xpOrderClient.hasUnPaodOrder(uid);
if (r.getData() > 0) {
- throw new RuntimeException("有正在进行的订单");
+ throw new ServiceException("有正在进行的订单");
}
// 获取起点经纬度
@@ -737,7 +740,7 @@
int targetedVal = 0;
R<List<XpTargetedServiceVehicleVo>> targetedServiceUserR = xpTargetedServiceClient.findListByUserIdAndCityCode(xpOrder.getAppUserId(), xpOrder.getCityCode());
- if(targetedServiceUserR.getCode() == R.SUCCESS && !targetedServiceUserR.getData().isEmpty()){
+ if(targetedServiceUserR.getCode() == R.SUCCESS && CollUtil.isNotEmpty(targetedServiceUserR.getData()) ){
targetedVal = targetedServiceUserR.getData().get(0).getWeight();
}
//String key = CacheConstants.QUEUE_POINT_ID + "-" + xpPoint.getId() + "-" + xpPoint.getPointLon() + "," + xpPoint.getPointLat();
@@ -1080,7 +1083,8 @@
payload.setUserCouponId(routeAndFareDto.getUserCouponId());
payload.setRoutes(options);
- XpTradingStrategyDetailVO strategyDetailVO = xpTradingStrategyClient.queryById().getData();
+ R<XpTradingStrategyDetailVO> strategyDetailVOR = xpTradingStrategyClient.queryById();
+ XpTradingStrategyDetailVO strategyDetailVO = strategyDetailVOR.getData();
redisService.setCacheObject(CacheConstants.ORDER_MULTI_ROUTE_SNAPSHOT + userId + ":" + snapshotId, JSON.toJSONString(payload), Long.valueOf(strategyDetailVO.getMaxStandingTiming()), TimeUnit.SECONDS);
MultiRouteAndFareVo vo = new MultiRouteAndFareVo();
@@ -1096,7 +1100,6 @@
redisService.setCacheObject("ORDER_NAVIGATION_END_DATA:" + userId, JSON.toJSONString(first.getRoute()), 24L, TimeUnit.HOURS);
return vo;
}
- XpTradingStrategyClient xpTradingStrategyClient;
@Override
public void selectNavigationRoute(SelectNavigationRouteDto dto, String userId) {
String json = redisService.getCacheObject(CacheConstants.ORDER_MULTI_ROUTE_SNAPSHOT + userId + ":" + dto.getSnapshotId());
--
Gitblit v1.7.1