From 3366087d97eb9b2b0b06da1c25015674f7e3d4ba Mon Sep 17 00:00:00 2001 From: hebelala Date: Wed, 30 May 2018 19:25:41 +0800 Subject: [PATCH] #408 add @Transactional --- .../mybatis/service/impl/SystemConfig4SqlServiceImpl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/saturn-console-api/src/main/java/com/vip/saturn/job/console/mybatis/service/impl/SystemConfig4SqlServiceImpl.java b/saturn-console-api/src/main/java/com/vip/saturn/job/console/mybatis/service/impl/SystemConfig4SqlServiceImpl.java index 84efc5f5a..922c7731d 100644 --- a/saturn-console-api/src/main/java/com/vip/saturn/job/console/mybatis/service/impl/SystemConfig4SqlServiceImpl.java +++ b/saturn-console-api/src/main/java/com/vip/saturn/job/console/mybatis/service/impl/SystemConfig4SqlServiceImpl.java @@ -3,11 +3,12 @@ import com.vip.saturn.job.console.mybatis.entity.SystemConfig; import com.vip.saturn.job.console.mybatis.repository.SystemConfigRepository; import com.vip.saturn.job.console.mybatis.service.SystemConfig4SqlService; -import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.List; + /** * @author xiaopeng.he */ @@ -17,18 +18,19 @@ public class SystemConfig4SqlServiceImpl implements SystemConfig4SqlService { @Autowired private SystemConfigRepository systemConfigRepository; - @Transactional + @Transactional(readOnly = true) @Override public List selectByPropertiesAndLastly(List properties) { return systemConfigRepository.selectByPropertiesAndLastly(properties); } + @Transactional(readOnly = true) @Override public List selectByLastly() { return systemConfigRepository.selectByLastly(); } - @Transactional + @Transactional(readOnly = true) @Override public List selectByPropertyPrefix(String prefix) { return systemConfigRepository.selectByPropertyPrefix(prefix);