From 30327a25b1765f65f3d7aa382459cd8332ee9d28 Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Wed, 1 Jun 2022 21:48:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=AE=A1=E6=A0=B8=E5=BC=80?= =?UTF-8?q?=E5=85=B3=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/xkrs/controller/SettingController.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/xkrs/controller/SettingController.java b/src/main/java/com/xkrs/controller/SettingController.java index dfeb7fd..afe05e5 100644 --- a/src/main/java/com/xkrs/controller/SettingController.java +++ b/src/main/java/com/xkrs/controller/SettingController.java @@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; +import javax.transaction.Transactional; import java.util.List; import java.util.Locale; @@ -25,6 +26,7 @@ public class SettingController { @Resource private SettingDao settingDao; + @Transactional(rollbackOn = Exception.class) @PostMapping("/updateswitchstate") public String updateSwitchState(@RequestBody SettingQo settingQo) { Locale locale = LocaleContextHolder.getLocale();