中控信息

This commit is contained in:
PC 2026-01-22 11:41:32 +08:00
parent ab5d844156
commit 7da179dea3

View File

@ -543,7 +543,12 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
if (ebikeEcuInfo == null) {
throw new EbikeException("中控编号错误,该中控仓库中不存在");
}
queryWrapper.clear();
queryWrapper.where(EBIKE_BIKE_INFO.ECU_ID.eq(ebikeEcuInfo.getEcuId()));
long count = this.mapper.selectCountByQuery(queryWrapper);
if (count > 0){
throw new EbikeException("中控已绑定其他车辆,不能进行换绑");
}
queryWrapper.clear();
queryWrapper.where(EBIKE_BIKE_INFO.BIKE_CODE.eq(bikeCode));
EbikeBikeInfo bikeInfo = getOne(queryWrapper);