puzhibing
2026-03-03 1e16fb98c0dd2db59429e7b40f42841ea01bdb2e
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpPointManagementController.java
@@ -116,12 +116,10 @@
//    @Transactional
//    @ShardingSphereTransactionType(TransactionType.BASE)
    public R edit(@Validated @RequestBody PointUpdateDto pointAddDto) {
        XpPoint xpPoint = xpPointService.getById(pointAddDto.getId());
        //先删除原有的数据,因为会存在点位的从属区域变化的情况,所以先删除原有的数据后添加新的数据重新分片到新的库中
        xpPointService.removeById(pointAddDto.getId());
        XpPoint xpPoint = new XpPoint();
        BeanUtils.copyProperties(pointAddDto, xpPoint);
        xpPoint.setId(null);
        xpPointService.save(xpPoint);
        xpPoint.setElectronicAreaId(null);
        xpPointService.updateById(xpPoint);
        return R.ok();
    }