记录最新骑行时间

This commit is contained in:
attiya 2025-11-25 14:10:21 +08:00
parent fa671f6946
commit 2218768ebe
2 changed files with 6 additions and 0 deletions

View File

@ -125,4 +125,8 @@ public class EbikeBikeInfo implements Serializable {
*/ */
private Boolean hasHelme; private Boolean hasHelme;
/**
* 最新骑行时间
*/
private LocalDateTime latestCyclingTime;
} }

View File

@ -30,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.time.DayOfWeek; import java.time.DayOfWeek;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime; import java.time.LocalTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -314,6 +315,7 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
ebikeEcuInfoService.unLock(ebikeEcuInfo); ebikeEcuInfoService.unLock(ebikeEcuInfo);
info.setUsageStatus(BikeUsageStatus.CYCLING); info.setUsageStatus(BikeUsageStatus.CYCLING);
info.setLatestCyclingTime(LocalDateTime.now());
this.mapper.update(info); this.mapper.update(info);
} }