|
@@ -2,6 +2,7 @@ package com.zkqy.framework.aspectj;
|
|
|
|
|
|
|
|
|
import com.zkqy.common.core.domain.AjaxResult;
|
|
|
+import com.zkqy.common.core.domain.entity.SysUser;
|
|
|
import com.zkqy.common.exception.tenantdatassource.TenantDataSource;
|
|
|
import com.zkqy.common.utils.SecurityUtils;
|
|
|
import com.zkqy.common.utils.reflect.ReflectUtils;
|
|
@@ -51,7 +52,11 @@ public class SqlInterceptor implements Interceptor {
|
|
|
// 根据类型设置不同的选择数据源格式
|
|
|
private String modifySql(String sql) {
|
|
|
try {
|
|
|
- SecurityUtils.getDatabaseType();
|
|
|
+ if (SecurityUtils.getLoginUser().getUser().isAdmin()) {
|
|
|
+ return sql;
|
|
|
+ } else {
|
|
|
+ SecurityUtils.getDatabaseType();
|
|
|
+ }
|
|
|
} catch (Exception e) {
|
|
|
return "error";
|
|
|
}
|