From dbc4616dc648d25b3a1e3792f2e53b125ccfdc00 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期一, 20 九月 2021 18:56:43 +0800
Subject: [PATCH] reset dataSourceAspect
---
src/main/java/com/ruoyi/project/system/controller/SysConfigController.java | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/main/java/com/ruoyi/project/system/controller/SysConfigController.java b/src/main/java/com/ruoyi/project/system/controller/SysConfigController.java
index 9a832cb..6fc0ed3 100644
--- a/src/main/java/com/ruoyi/project/system/controller/SysConfigController.java
+++ b/src/main/java/com/ruoyi/project/system/controller/SysConfigController.java
@@ -13,7 +13,6 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.constant.UserConstants;
-import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
@@ -88,7 +87,7 @@
{
return AjaxResult.error("鏂板鍙傛暟'" + config.getConfigName() + "'澶辫触锛屽弬鏁伴敭鍚嶅凡瀛樺湪");
}
- config.setCreateBy(SecurityUtils.getUsername());
+ config.setCreateBy(getUsername());
return toAjax(configService.insertConfig(config));
}
@@ -104,7 +103,7 @@
{
return AjaxResult.error("淇敼鍙傛暟'" + config.getConfigName() + "'澶辫触锛屽弬鏁伴敭鍚嶅凡瀛樺湪");
}
- config.setUpdateBy(SecurityUtils.getUsername());
+ config.setUpdateBy(getUsername());
return toAjax(configService.updateConfig(config));
}
@@ -116,18 +115,19 @@
@DeleteMapping("/{configIds}")
public AjaxResult remove(@PathVariable Long[] configIds)
{
- return toAjax(configService.deleteConfigByIds(configIds));
+ configService.deleteConfigByIds(configIds);
+ return success();
}
/**
- * 娓呯┖缂撳瓨
+ * 鍒锋柊鍙傛暟缂撳瓨
*/
@PreAuthorize("@ss.hasPermi('system:config:remove')")
@Log(title = "鍙傛暟绠$悊", businessType = BusinessType.CLEAN)
- @DeleteMapping("/clearCache")
- public AjaxResult clearCache()
+ @DeleteMapping("/refreshCache")
+ public AjaxResult refreshCache()
{
- configService.clearCache();
+ configService.resetConfigCache();
return AjaxResult.success();
}
}
--
Gitblit v1.9.3