mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-11-18 07:03:43 +08:00
【update】 修改数据源为oracle数据库,调整system代码,部分sql兼容oracle数据库,已测试系统管理菜单下所有功能
This commit is contained in:
@@ -117,7 +117,7 @@ public class DataScopeAspect {
|
||||
deptAlias, user.getDeptId()));
|
||||
} else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope)) {
|
||||
sqlString.append(StrUtil.format(
|
||||
" OR {}dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )",
|
||||
" OR {}dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) <![CDATA[ <> ]]> 0 )",
|
||||
deptAlias, user.getDeptId(), user.getDeptId()));
|
||||
} else if (DATA_SCOPE_SELF.equals(dataScope)) {
|
||||
if (isUser) {
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.framework.config;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.DbType;
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||
import com.baomidou.mybatisplus.extension.incrementer.OracleKeyGenerator;
|
||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||
@@ -41,7 +42,7 @@ public class MybatisPlusConfig {
|
||||
public PaginationInnerInterceptor paginationInnerInterceptor() {
|
||||
PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor();
|
||||
// 设置数据库类型为mysql
|
||||
paginationInnerInterceptor.setDbType(DbType.MYSQL);
|
||||
paginationInnerInterceptor.setDbType(DbType.ORACLE);
|
||||
// 设置最大单页限制数量,默认 500 条,-1 不受限制
|
||||
paginationInnerInterceptor.setMaxLimit(-1L);
|
||||
return paginationInnerInterceptor;
|
||||
@@ -106,4 +107,15 @@ public class MybatisPlusConfig {
|
||||
* https://baomidou.com/guide/interceptor-dynamic-table-name.html
|
||||
*/
|
||||
|
||||
/**
|
||||
* Sequence主键自增
|
||||
*
|
||||
* @return 返回oracle自增类
|
||||
* @author zhenggc
|
||||
* @date 2019/1/2
|
||||
*/
|
||||
@Bean
|
||||
public OracleKeyGenerator oracleKeyGenerator(){
|
||||
return new OracleKeyGenerator();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user