整车绑定

This commit is contained in:
attiya 2025-11-05 11:32:27 +08:00
parent 64ff73c373
commit 7c8b9dfeb8

View File

@ -174,13 +174,15 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
EbikeBikeInfo bikeInfo = EbikeBikeInfo.builder()
.operatorId(operatorId)
.bikeCode(bindVo.getBikeCode())
.batteryId(batteryInfo.getBatteryId())
.ecuId(ecuInfo.getEcuId())
.hasHelme(bindVo.getHasHelme())
.status(BikeStatus.UN_LAUNCH)
.usageStatus(BikeUsageStatus.BIND)
.createdBy(StpUtil.getLoginIdAsLong())
.build();
if (batteryInfo != null){
bikeInfo.setBatteryId(batteryInfo.getBatteryId());
}
this.mapper.insert(bikeInfo);
}