puzhibing
2026-03-04 90e07ead1c9702637c9747ff2ca7f2571f2be75c
修改点位编辑的处理逻辑
1个文件已修改
8 ■■■■■ 已修改文件
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpPointManagementController.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpPointManagementController.java
@@ -116,10 +116,12 @@
//    @Transactional
//    @ShardingSphereTransactionType(TransactionType.BASE)
    public R edit(@Validated @RequestBody PointUpdateDto pointAddDto) {
        XpPoint xpPoint = new XpPoint();
        XpPoint xpPoint = xpPointService.getById(pointAddDto.getId());
        //先删除原有的数据,因为会存在点位的从属区域变化的情况,所以先删除原有的数据后添加新的数据重新分片到新的库中
        xpPointService.removeById(pointAddDto.getId());
        BeanUtils.copyProperties(pointAddDto, xpPoint);
        xpPoint.setElectronicAreaId(null);
        xpPointService.updateById(xpPoint);
        xpPoint.setId(null);
        xpPointService.save(xpPoint);
        return R.ok();
    }