From 329213289d05d9358d0c82088a5c64f9aee872a9 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期一, 04 十一月 2024 14:08:14 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingRecordController.java | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingRecordController.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingRecordController.java index cddab90..017b89e 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingRecordController.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TParkingRecordController.java @@ -37,6 +37,7 @@ import java.math.BigDecimal; import java.net.URLEncoder; import java.time.LocalDate; +import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.HashMap; @@ -76,6 +77,7 @@ .between(query.getTimePeriod()!=null,TParkingRecord::getInParkingTime,s1,s2) .or() .between(query.getTimePeriod()!=null,TParkingRecord::getOutParkingTime,s1,s2) + .orderByDesc(TParkingRecord::getCreateTime) .page(Page.of(query.getPageCurr(), query.getPageSize())); for (TParkingRecord record : page.getRecords()) { @@ -150,6 +152,7 @@ public R out(Long id) { TParkingRecord byId = parkingRecordService.getById(id); byId.setStatus(2); + byId.setOutParkingTime(LocalDateTime.now()); parkingRecordService.updateById(byId); return R.ok(); -- Gitblit v1.7.1