From cfbd83fc9d638c8d3d66a4f7e27904406752f7c1 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期五, 20 九月 2024 10:38:40 +0800 Subject: [PATCH] data @DSTransactional --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java index b410b7f..44402c3 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java @@ -1,6 +1,7 @@ package com.iailab.module.data.point.service.impl; import com.alibaba.fastjson.JSONArray; +import com.baomidou.dynamic.datasource.annotation.DSTransactional; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.iailab.framework.common.pojo.PageResult; @@ -20,7 +21,6 @@ import com.iailab.module.data.point.vo.DaPointPageReqVO; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import javax.annotation.Resource; @@ -90,7 +90,7 @@ } @Override - @Transactional(rollbackFor = Exception.class) + @DSTransactional(rollbackFor = Exception.class) public void add(DaPointDTO dataPoint) { DaPointEntity daPointEntity = ConvertUtils.sourceToTarget(dataPoint, DaPointEntity.class); daPointEntity.setId(UUID.randomUUID().toString()); @@ -113,7 +113,7 @@ } @Override - @Transactional(rollbackFor = Exception.class) + @DSTransactional(rollbackFor = Exception.class) public void update(DaPointDTO dataPoint) { DaPointEntity daPointEntity = ConvertUtils.sourceToTarget(dataPoint, DaPointEntity.class); daPointEntity.setUpdateTime(new Date()); @@ -130,7 +130,7 @@ } @Override - @Transactional(rollbackFor = Exception.class) + @DSTransactional(rollbackFor = Exception.class) public void delete(String[] ids) { daPointDao.deleteBatchIds(Arrays.asList(ids)); daMeasurePointService.deleteByPoint(ids); -- Gitblit v1.9.3