记录最新骑行时间
This commit is contained in:
parent
fa671f6946
commit
2218768ebe
@ -125,4 +125,8 @@ public class EbikeBikeInfo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Boolean hasHelme;
|
private Boolean hasHelme;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最新骑行时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime latestCyclingTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user