提现申请优化

This commit is contained in:
墨大叔 2024-08-12 19:28:30 +08:00
parent babd77042e
commit 91c924d69b
4 changed files with 17 additions and 6 deletions

View File

@ -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());
}
}

View File

@ -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());

View File

@ -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
</sql>
@ -66,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="totalAmount != null">total_amount,</if>
<if test="closeReason != null and closeReason != ''">close_reason,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="batchNo != null and batchNo != ''">#{batchNo},</if>
@ -78,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if>
<if test="totalAmount != null">#{totalAmount},</if>
<if test="closeReason != null and closeReason != ''">#{closeReason},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
@ -100,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="data.createTime != null">create_time = #{data.createTime},</if>
<if test="data.totalAmount != null">total_amount = #{data.totalAmount},</if>
<if test="data.closeReason != null and data.closeReason != ''">close_reason = #{data.closeReason},</if>
<if test="data.updateTime != null">update_time = #{data.updateTime},</if>
</sql>
<update id="updateByQuery">

View File

@ -264,6 +264,7 @@ public class TransferServiceImpl implements TransferService
Transfer data = new Transfer();
List<TransferDetail> 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())) {