1 Star 0 Fork 23

陈雄 / ruoyi-vue-flex

forked from yhan219 / RuoYi-Vue-Flex 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

简介

码云Gitee GitHub License
ruoyi-vue-flex Spring Boot JDK-17 JDK-21

ruoyi-vue-flex是基于ruoyi-vue-plus 5.X分支的一个快速开发框架。

RuoYi-Vue-Plus 是重写 RuoYi-Vue 针对 分布式集群与多租户 场景全方位升级(不兼容原框架)

ruoyi-vue-flex将ruoyi-vue-plus中使用的mybatis-plus替换为mybatis-flex,并根据两个ORM框架使用的不同修改了部分逻辑。底层完全重写。

ruoyi-vue-flex与ruoyi-vue-plus功能完全相同。

ruoyi-vue-flex将定期同步ruoyi-vue-plus,非冲突功能每天升级,冲突功能最迟不超过一周完成升级。

另有cloud版ruoyi-cloud-flex欢迎使用

版本

与ruoyi-vue-plus保持一致,当前版本5.1.2

与ruoyi-vue-plus的差异

前端框架差异

默认使用ruoyi-plus-vben,可在配置文件中修改为plus-ui

# 代码生成
gen:
  # 使用的模版 默认是vben,原生的是vue
  platform: vben

数据权限用法差异

数据权限注解,修改为类,原写法:

    @DataPermission({
        @DataColumn(key = "deptName", value = "d.dept_id"),
        @DataColumn(key = "userName", value = "r.create_by")
    })
    Page<SysRoleVo> selectPageRoleList(@Param("page") Page<SysRole> page, @Param(Constants.WRAPPER) Wrapper<SysRole> queryWrapper);

现写法:

    Page<SysRoleVo> selectPageRoleList(PageQuery pageQuery, QueryWrapper queryWrapper){
        return paginateAs(pageQuery, queryWrapper, DataColumn.of("deptName", "d.dept_id"), DataColumn.of("userName", "r.create_by"));
    }

注:尝试写过拦截器以达到用法完全相同的目的,可惜拦截器功能和mybatis flex的插件不兼容,使用了数据权限插件,则无法使用mybatis flex的多租户插件等。如果你有更好的方法,欢迎pr

忽略租户写法差异

  • 配置中的差异: 原写法: 在yml中配置忽略的表,mybatis-flex不支持,但mybatis-flex会默认忽略没有多租户字段的表
  • 代码中的差异: 原写法:在mapper中配置注解:
    @InterceptorIgnore(tenantLine = "true")
    SysUserVo selectTenantUserByUserName(@Param("userName") String userName, @Param("tenantId") String tenantId);

现写法:

// mapper中删除InterceptorIgnore注解,在service中手动忽略
TenantHelper.ignore(() -> baseMapper.selectTenantUserByUserName(userName, tenantId));

特别鸣谢

ruoyi-vue-plus

mybatis-flex

ruoyi-plus-vben

预览图

The MIT License (MIT) Copyright (c) 2019 RuoYi-Vue-Plus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

ruoyi-vue-flex是基于ruoyi-vue-plus的一个快速开发框架。将ruoyi-vue-plus中使用的mybatis-plus替换为mybatis-flex,并根据两个ORM框架使用的不同修改了部分逻辑。 集成 Sa-Token、Mybatis-Flex、PowerJob、Jackson、SpringDoc、Hutool、OSS 定期同步等 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/coldco519/ruoyi-vue-flex.git
git@gitee.com:coldco519/ruoyi-vue-flex.git
coldco519
ruoyi-vue-flex
ruoyi-vue-flex
mybatis-flex

搜索帮助