From 01ac08186355e85cab4a7c6f4403180184894f23 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期六, 09 十月 2021 14:38:44 +0800 Subject: [PATCH] 1. 新增网格化数据统计功能 --- src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/ElectricityServiceImpl.kt | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/ElectricityServiceImpl.kt b/src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/ElectricityServiceImpl.kt index afe80b0..0d933f4 100644 --- a/src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/ElectricityServiceImpl.kt +++ b/src/main/kotlin/com/flightfeather/uav/lightshare/service/impl/ElectricityServiceImpl.kt @@ -39,10 +39,18 @@ sTime?.let { andGreaterThanOrEqualTo("mvDataTime", it) } eTime?.let { andLessThanOrEqualTo("mvDataTime", it) } } - orderBy("mvDataTime") + orderBy("mvDataTime").apply { + // 褰撹姹傛帴鍙d笉浼犻�掕捣濮嬫椂闂达紝榛樿鑾峰彇鏈�鏂扮殑鏁版嵁 + if (startTime == null && endTime == null) { + desc() + } + } }).forEach { it?.let { result.add(it) } } + if (startTime == null && endTime == null) { + result.reverse() + } return BaseResponse(true, head = DataHead(pageInfo.pageNum, pageInfo.pages), data = result) } -- Gitblit v1.9.3