From 6d538608ff054d1d51281e1d7925323f24cc7dee Mon Sep 17 00:00:00 2001
From: zhibing.pu <393733352@qq.com>
Date: 星期四, 09 五月 2024 16:53:11 +0800
Subject: [PATCH] 修改
---
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderServiceImpl.java | 80 +++++++++++++++++++++++++++++++---------
1 files changed, 62 insertions(+), 18 deletions(-)
diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderServiceImpl.java
index fc50be0..c2a091f 100644
--- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderServiceImpl.java
+++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderServiceImpl.java
@@ -2,9 +2,15 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
+import com.stylefeng.guns.core.util.ToolUtil;
import com.stylefeng.guns.modular.crossCity.server.IOrderCrossCityService;
+import com.stylefeng.guns.modular.smallLogistics.model.OrderLogistics;
import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService;
+import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar;
import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService;
+import com.stylefeng.guns.modular.system.model.Car;
+import com.stylefeng.guns.modular.system.model.UserInfo;
+import com.stylefeng.guns.modular.system.service.ICarService;
import com.stylefeng.guns.modular.system.service.IOrderService;
import com.stylefeng.guns.modular.system.service.IUserInfoService;
import com.stylefeng.guns.modular.system.util.ChinaMobileUtil;
@@ -23,6 +29,7 @@
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
+import java.util.HashMap;
import java.util.Map;
@@ -53,6 +60,9 @@
@Autowired
private IOrderLogisticsService orderLogisticsService;
+ @Autowired
+ private ICarService carService;
+
/**
* 获取预计行驶时间
@@ -81,30 +91,30 @@
* @throws Exception
*/
@Override
- public ResultUtil weChatPay(Integer orderId, Integer orderType, Integer type, Integer userType, Integer uid, String content) throws Exception {
+ public ResultUtil weChatPay(Integer orderId, Integer orderType, Integer type, Integer userType, Integer uid, String content, Integer language) throws Exception {
JSONObject jsonObject = JSON.parseObject(content);
switch (type){
case 1://订单完成支付
- switch (orderType){
- case 1:
- return orderPrivateCarService.payPrivateCarOrder(1, orderId, (null == jsonObject ? null : jsonObject.getIntValue("couponId")), 3);
- case 2:
- return orderTaxiService.payTaxiOrder(1, orderId, (null == jsonObject ? null : jsonObject.getIntValue("couponId")), 3);
- case 3:
- return orderCrossCityService.payCrossCityOrder(1, orderId, (null == jsonObject ? null : jsonObject.getIntValue("couponId")), 3);
- case 4:
- return orderLogisticsService.payLogisticsOrder(1, orderId, 3);
- case 5:
- return orderLogisticsService.payLogisticsOrder(1, orderId, 3);
- }
+// switch (orderType){
+// case 1:
+// return orderPrivateCarService.payPrivateCarOrder(1, orderId, (null == jsonObject ? null : jsonObject.getIntValue("couponId")), 3, 1);
+// case 2:
+// return orderTaxiService.payTaxiOrder(1, orderId, (null == jsonObject ? null : jsonObject.getIntValue("couponId")), 3);
+// case 3:
+// return orderCrossCityService.payCrossCityOrder(1, orderId, (null == jsonObject ? null : jsonObject.getIntValue("couponId")), 3);
+// case 4:
+// return orderLogisticsService.payLogisticsOrder(1, orderId, 3, 1);
+// case 5:
+// return orderLogisticsService.payLogisticsOrder(1, orderId, 3, 1);
+// }
case 2://订单取消支付
switch (orderType){
case 1:
- return orderPrivateCarService.cancleOrderPrivateCar(orderId, 1, null == jsonObject ? null : jsonObject.getIntValue("cancelId"), 3);
+// return orderPrivateCarService.cancleOrderPrivateCar(orderId, 1, null == jsonObject ? null : jsonObject.getIntValue("cancelId"), 3);
case 2:
- return orderTaxiService.cancleOrderTaxi(orderId, 1, null == jsonObject ? null : jsonObject.getIntValue("cancelId"), 3);
+ return orderTaxiService.cancleOrderTaxi(orderId, 1, null == jsonObject ? null : jsonObject.getIntValue("cancelId"), 3, language);
case 3:
- return orderCrossCityService.cancleOrderCrossCity(orderId, 1, null == jsonObject ? null : jsonObject.getIntValue("cancelId"), 3);
+ return orderCrossCityService.cancleOrderCrossCity(orderId, 1, null == jsonObject ? null : jsonObject.getIntValue("cancelId"), 3, language);
}
case 3://司机端改派支付
@@ -125,14 +135,48 @@
return ResultUtil.success(jsonObject1.getString("msg"), jsonObject1.getString("data"));
case 4://余额充值
if(userType == 1){
- return userInfoService.depositBalance(1, jsonObject.getDoubleValue("money"), uid, 3);
+// return userInfoService.depositBalance(1, jsonObject.getDoubleValue("money"), uid, 3, 1);
}
if(userType == 2){
}
case 5://小件物流补差价
- return orderLogisticsService.payLogisticsOrder_(1, orderId, 3);
+// return orderLogisticsService.payLogisticsOrder_(1, orderId, 3);
}
return ResultUtil.success();
}
+
+
+ /**
+ * 获取订单车牌信息
+ * @param orderType
+ * @param orderId
+ * @return
+ */
+ @Override
+ public Map<String, Object> queryOrderLicensePlate(Integer orderType, Integer orderId) {
+ Map<String, Object> map = new HashMap<>();
+ if(orderType == 1){
+ OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId);
+ if(null != orderPrivateCar.getCarId()){
+ Car car = carService.selectById(orderPrivateCar.getCarId());
+ map.put("licensePlate", car.getCarLicensePlate());
+ }
+ map.put("userName", orderPrivateCar.getPassengers());
+ map.put("phone", orderPrivateCar.getPassengersPhone());
+ }
+ if(orderType == 4){
+ OrderLogistics orderLogistics = orderLogisticsService.selectById(orderId);
+ if(null != orderLogistics.getCarId()){
+ Car car = carService.selectById(orderLogistics.getCarId());
+ map.put("licensePlate", car.getCarLicensePlate());
+ }
+ if(null != orderLogistics.getUserId()){
+ UserInfo userInfo = userInfoService.selectById(orderLogistics.getUserId());
+ map.put("userName", ToolUtil.isEmpty(userInfo.getFirstName()) ? userInfo.getNickName() : userInfo.getFirstName() + " " + userInfo.getLastName());
+ map.put("phone", userInfo.getPhone());
+ }
+ }
+ return map;
+ }
}
--
Gitblit v1.7.1