From 9778d08f84982e3061d17dd9320b44242e0b4745 Mon Sep 17 00:00:00 2001
From: jiaosong <jiaosong6760@dingtalk.com>
Date: 星期四, 19 十月 2023 13:55:24 +0800
Subject: [PATCH] #单位提交 分转换元
---
server/services/src/main/java/com/doumee/service/business/impl/MemberRidesServiceImpl.java | 6 ++++--
server/platform/pom.xml | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/server/platform/pom.xml b/server/platform/pom.xml
index c1837b4..238f99c 100644
--- a/server/platform/pom.xml
+++ b/server/platform/pom.xml
@@ -53,4 +53,4 @@
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
diff --git a/server/services/src/main/java/com/doumee/service/business/impl/MemberRidesServiceImpl.java b/server/services/src/main/java/com/doumee/service/business/impl/MemberRidesServiceImpl.java
index 349f663..20a3f3c 100644
--- a/server/services/src/main/java/com/doumee/service/business/impl/MemberRidesServiceImpl.java
+++ b/server/services/src/main/java/com/doumee/service/business/impl/MemberRidesServiceImpl.java
@@ -338,7 +338,7 @@
}
QueryWrapper<SystemDictData> wrapper = new QueryWrapper<>();
wrapper.lambda()
- .in(SystemDictData::getLabel, Arrays.asList(Constants.FORCE_BACK_SITE,Constants.FORCE_BACK_LOCK));
+ .in(SystemDictData::getLabel, Arrays.asList(Constants.FORCE_BACK_SITE,Constants.FORCE_BACK_LOCK,Constants.FREE_RENT_TIME));
List<SystemDictData> systemDictData = systemDictDataMapper.selectList(wrapper);
Map<String, SystemDictData> collect = systemDictData.stream().collect(Collectors.toMap(s -> s.getLabel(), s -> s));
@@ -354,8 +354,10 @@
update.setStatus(Constants.MEMBER_RIDES_STATUS.BACK_CYCLING.getKey());
update.setBackSiteId(collect.get(Constants.FORCE_BACK_SITE).getCode());
update.setBackLockId(collect.get(Constants.FORCE_BACK_LOCK).getCode());
+ Integer freeRentTime = Integer.valueOf(collect.get(Constants.FREE_RENT_TIME).getCode());
+ Integer rideTime = DateUtil.betweenMin(model.getRentDate(), update.getBackDate());
//璁$畻楠戣璁¤垂鏃堕暱
- update.setDuration(DateUtil.betweenMin(model.getRentDate(), update.getBackDate()));
+ update.setDuration( freeRentTime > 0 ? rideTime - freeRentTime : rideTime);
memberRidesMapper.updateById(update);
//淇敼鍓�
String beforeContent = JSONObject.toJSONString(model);
--
Gitblit v1.9.3