|
@@ -1,6 +1,9 @@
|
|
|
package com.kym.service.wechat.impl;
|
|
package com.kym.service.wechat.impl;
|
|
|
|
|
|
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
|
|
|
+import cn.hutool.core.date.DateTime;
|
|
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
|
|
+import cn.hutool.core.date.LocalDateTimeUtil;
|
|
|
import cn.hutool.core.io.IoUtil;
|
|
import cn.hutool.core.io.IoUtil;
|
|
|
import cn.hutool.core.util.RandomUtil;
|
|
import cn.hutool.core.util.RandomUtil;
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
@@ -215,13 +218,16 @@ public class WxPayServiceImpl implements WxPayService {
|
|
|
return ResponseEntity.status(HttpStatus.OK);
|
|
return ResponseEntity.status(HttpStatus.OK);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ DateTime dt = DateUtil.parse(transaction.getSuccessTime());
|
|
|
|
|
+ LocalDateTime successTime = LocalDateTimeUtil.of(dt);
|
|
|
|
|
+
|
|
|
// 资金流水
|
|
// 资金流水
|
|
|
var walletDetail = walletDetailService.getWalletDetailByOrderNo(transaction.getOutTradeNo());
|
|
var walletDetail = walletDetailService.getWalletDetailByOrderNo(transaction.getOutTradeNo());
|
|
|
if (walletDetail != null) {
|
|
if (walletDetail != null) {
|
|
|
walletDetail.setStatus(WalletDetail.STATUS_已确认); //已确认
|
|
walletDetail.setStatus(WalletDetail.STATUS_已确认); //已确认
|
|
|
walletDetail.setCurrency(transaction.getAmount().getCurrency());
|
|
walletDetail.setCurrency(transaction.getAmount().getCurrency());
|
|
|
walletDetail.setAmount(transaction.getAmount().getTotal());
|
|
walletDetail.setAmount(transaction.getAmount().getTotal());
|
|
|
- walletDetail.setTransactionTime(LocalDateTime.parse(transaction.getSuccessTime()));
|
|
|
|
|
|
|
+ walletDetail.setTransactionTime(successTime);
|
|
|
walletDetailService.updateById(walletDetail);
|
|
walletDetailService.updateById(walletDetail);
|
|
|
|
|
|
|
|
// 更新余额
|
|
// 更新余额
|
|
@@ -236,7 +242,7 @@ public class WxPayServiceImpl implements WxPayService {
|
|
|
payLog.setMchId(transaction.getMchid());
|
|
payLog.setMchId(transaction.getMchid());
|
|
|
payLog.setOutTradeNo(transaction.getOutTradeNo());
|
|
payLog.setOutTradeNo(transaction.getOutTradeNo());
|
|
|
payLog.setTransactionId(transaction.getTransactionId());
|
|
payLog.setTransactionId(transaction.getTransactionId());
|
|
|
- payLog.setSuccessTime(LocalDateTime.parse(transaction.getSuccessTime()));
|
|
|
|
|
|
|
+ payLog.setSuccessTime(successTime);
|
|
|
payLog.setTradeType(transaction.getTradeType().name());
|
|
payLog.setTradeType(transaction.getTradeType().name());
|
|
|
payLog.setTradeState(transaction.getTradeState().name());
|
|
payLog.setTradeState(transaction.getTradeState().name());
|
|
|
payLog.setAttach(transaction.getAttach());
|
|
payLog.setAttach(transaction.getAttach());
|