diff --git a/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/utils/DateUtils.java b/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/utils/DateUtils.java index 5dfee259..e47b696d 100644 --- a/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/utils/DateUtils.java +++ b/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/utils/DateUtils.java @@ -3,11 +3,7 @@ package com.ruoyi.common.utils; import java.lang.management.ManagementFactory; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.time.LocalTime; -import java.time.ZoneId; -import java.time.ZonedDateTime; +import java.time.*; import java.time.format.DateTimeFormatter; import java.util.Calendar; import java.util.Date; @@ -283,4 +279,13 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils DateTimeFormatter formatter = DateTimeFormatter.ISO_ZONED_DATE_TIME; return LocalDateTime.parse(time, formatter); } + + /** + * RFC3339格式转为Date + */ + public static Date toDateByRfc3339(String str) { + DateTimeFormatter formatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; + OffsetDateTime dateTime = OffsetDateTime.parse(str, formatter); + return Date.from(dateTime.toInstant()); + } } diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/service/impl/TransactionBillServiceImpl.java b/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/service/impl/TransactionBillServiceImpl.java index 452500e3..02c7c17b 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/service/impl/TransactionBillServiceImpl.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/service/impl/TransactionBillServiceImpl.java @@ -1156,6 +1156,7 @@ public class TransactionBillServiceImpl implements TransactionBillService, After // 修改提现状态 TransactionBill data = new TransactionBill(); data.setStatus(TransactionBillStatus.WITHDRAW_SUCCESS.getStatus()); + data.setPayTime(transfer.getUpdateTime()); TransactionBillQuery query = new TransactionBillQuery(); query.setStatus(TransactionBillStatus.WITHDRAW_PAYING.getStatus()); query.setBillId(transfer.getBstId()); diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/transfer/mapper/TransferMapper.xml b/smart-switch-service/src/main/java/com/ruoyi/ss/transfer/mapper/TransferMapper.xml index 4047baf0..621baa72 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/transfer/mapper/TransferMapper.xml +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/transfer/mapper/TransferMapper.xml @@ -18,7 +18,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" st.batch_remark, st.create_time, st.total_amount, - st.close_reason + st.close_reason, + st.update_time from ss_transfer st @@ -66,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_time, total_amount, close_reason, + update_time, #{batchNo}, @@ -78,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{createTime}, #{totalAmount}, #{closeReason}, + #{updateTime}, @@ -100,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_time = #{data.createTime}, total_amount = #{data.totalAmount}, close_reason = #{data.closeReason}, + update_time = #{data.updateTime}, diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/transfer/service/impl/TransferServiceImpl.java b/smart-switch-service/src/main/java/com/ruoyi/ss/transfer/service/impl/TransferServiceImpl.java index d65497a6..81a128f4 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/transfer/service/impl/TransferServiceImpl.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/transfer/service/impl/TransferServiceImpl.java @@ -264,6 +264,7 @@ public class TransferServiceImpl implements TransferService Transfer data = new Transfer(); List detaiList = new ArrayList<>(); + data.setUpdateTime(DateUtils.toDateByRfc3339(transferBatch.getUpdateTime())); // 已完成:所有明细都处理完成了 if (WxTransferBatchStatus.FINISHED.getStatus().equals(transferBatch.getBatchStatus())) { if (transferBatch.getSuccessNum() != null && Objects.equals(transferBatch.getSuccessNum(), transferBatch.getTotalNum())) {