From e031959940a80792a60e2d8b83499cd168fa83d6 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期四, 12 三月 2026 17:18:18 +0800
Subject: [PATCH] 修改事务注解
---
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpPointServiceImpl.java | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpPointServiceImpl.java b/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpPointServiceImpl.java
index d9c0c52..a13d498 100644
--- a/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpPointServiceImpl.java
+++ b/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpPointServiceImpl.java
@@ -39,11 +39,14 @@
import com.xiaopeng.map.vo.OrderDistanceVo;
import lombok.extern.slf4j.Slf4j;
import net.sourceforge.pinyin4j.PinyinHelper;
+import org.apache.shardingsphere.transaction.annotation.ShardingSphereTransactionType;
+import org.apache.shardingsphere.transaction.core.TransactionType;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalTime;
@@ -88,6 +91,8 @@
private RedissonClient redissonClient;
@Override
+ @Transactional
+ @ShardingSphereTransactionType(TransactionType.BASE)
public XpPoint addPointWithGeneratedNumber(PointAddDto pointAddDto) {
if (pointAddDto == null) {
throw new ServiceException("参数不能为空", I18nKeyConstant.SYSTEM_EXCEPTION);
--
Gitblit v1.7.1