修改--支付回调订单详情添加剩余时间(秒)

This commit is contained in:
haotian 2025-04-01 11:08:35 +08:00
parent 759af086f9
commit 8b5769219f
3 changed files with 30 additions and 9 deletions

View File

@ -597,17 +597,17 @@ public class AppSystemController extends BaseController {
}
}
// 新的签名不为空
if(!StringUtils.isEmpty(signature)){
UserInfo userInfo = userInfoService.selectUserInfoByUserId(getUserId());
if(!signature.equals(userInfo.getSignature())){
boolean f2 = userInfoService.updateSignature(username, signature);
if(!f2){
return error("更新签名失败");
}
// 新签名
UserInfo userInfo = userInfoService.selectUserInfoByUserId(getUserId());
if(!signature.equals(userInfo.getSignature())) {
boolean f2 = userInfoService.updateSignature(username, signature);
if (!f2) {
return error("更新签名失败");
}
}
if (!avatarImage.isEmpty()){
//-----------------------------------------新版文件上传------------------------------------------------------
String avatarFilePath = "";
@ -2192,6 +2192,8 @@ public class AppSystemController extends BaseController {
String c_x = String.format("%02d", sysOrderPayBackDto.getC_x());
String c_y = String.format("%02d", sysOrderPayBackDto.getC_y());
sysOrderPayBackDto.setArLocation(sysOrderPayBackDto.getPart()+c_x+c_y);
LocalDateTime now = LocalDateTime.now();
sysOrderPayBackDto.setRemainTime(Math.max(ChronoUnit.SECONDS.between(now, sysOrderPayBackDto.getEndTime()), 0));
return success(sysOrderPayBackDto);
}
return error("获取订单详情失败");

View File

@ -8,11 +8,13 @@ public class SysOrderPayBackDto {
private String orderInfoId;
private LocalDateTime createTime;
private LocalDateTime payTime;
private LocalDateTime endTime;
private Long money;
private String arLocation;
private String part;
private int c_x;
private int c_y;
private Long remainTime;
public Long getOrderId() {
return orderId;
@ -46,6 +48,14 @@ public class SysOrderPayBackDto {
this.payTime = payTime;
}
public LocalDateTime getEndTime() {
return endTime;
}
public void setEndTime(LocalDateTime endTime) {
this.endTime = endTime;
}
public String getArLocation() {
return arLocation;
}
@ -86,5 +96,13 @@ public class SysOrderPayBackDto {
this.money = money;
}
public Long getRemainTime() {
return remainTime;
}
public void setRemainTime(Long remainTime) {
this.remainTime = remainTime;
}
}

View File

@ -70,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap id="SysOrderPayBackDtoResult" type="SysOrderPayBackDto">
<result property="orderId" column="order_id"/>
<result property="createTime" column="create_time"/>
<result property="endTime" column="end_time"/>
<result property="orderInfoId" column="order_info_id"/>
<result property="money" column="money"/>
<result property="part" column="part"/>
@ -138,7 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where status = '1' and create_time = #{date} and delete_flag = '0'
</select>
<select id="getSysOrderPayBackDto" resultMap="SysOrderPayBackDtoResult">
select sys_order.order_id, create_time, order_info_id, money, part, c_x, c_y
select sys_order.order_id, create_time, sys_order.end_time, order_info_id, money, part, c_x, c_y
from sys_order
left join sys_source
on sys_order.source_id = sys_source.source_id