From 7ef83f0708e9d04c2536d7d0ad453073d42f680d Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期五, 25 十月 2024 11:27:27 +0800
Subject: [PATCH] 合并代码

---
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java
index be18d9b..adc90fe 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java
@@ -708,6 +708,9 @@
 			preChargeCheck1.setStartupSuccess(2);
 			order.setStatus(3);
 			order.setStartTime(LocalDateTime.now());
+			TChargingGun chargingGun = chargingGunClient.getChargingGunById(order.getChargingGunId()).getData();
+			chargingGun.setStatus(4);
+			chargingGunClient.updateChargingGunById(chargingGun);
 		}
 		redisService.setCacheObject("AQJC_" + order.getChargingGunId(), preChargeCheck1, 24L, TimeUnit.HOURS);
 		this.updateById(order);
@@ -789,6 +792,9 @@
 		one.setRefundStatus(2);
 		one.setRefundTime(LocalDateTime.now());
 		chargingOrderRefundService.updateById(one);
+		TChargingOrder chargingOrder = this.getById(one.getChargingOrderId());
+		chargingOrder.setPayTime(LocalDateTime.now());
+		this.updateById(chargingOrder);
 		return AjaxResult.success();
 	}
 
@@ -1927,7 +1933,7 @@
 			chargingOrderRefund.setRefundTitle("充电完成退款");
 			chargingOrderRefund.setRefundContent("充电完成退款");
 			chargingOrderRefund.setRefundReason("充电完成退款");
-			chargingOrderRefund.setRefundRemark("充电完成退款");
+			chargingOrderRefund.setRefundRemark("实际充电消费金额:" + refundAmount);
 			chargingOrderRefund.setRefundTotalAmount(refundAmount);
 			chargingOrderRefund.setPayAmount(rechargeAmount);
 			if(1 == rechargePaymentType){
@@ -1957,6 +1963,8 @@
 					SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-DDTHH:mm:ss+TIMEZONE");
 					AjaxResult success = chargingOrderStartupFailureWxRefund(resp.getOutTradeNo(), resp.getTradeNo(), "SUCCESS", sdf1.format(new Date()));
 					if(success.isSuccess()){
+						chargingOrder.setPayTime(LocalDateTime.now());
+						this.updateById(chargingOrder);
 						chargingOrderRefundService.save(chargingOrderRefund);
 					}
 				}

--
Gitblit v1.7.1