GithubHelp home page GithubHelp logo

yhan219 / ruoyi-vue-flex Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 3.0 82.79 MB

RuoYi-Vue-Flex是基于RuoYi-Vue-Plus的一个快速开发框架。将RuoYi-Vue-Plus中使用的MyBatis-Plus替换为MyBatis-Flex,并根据两个ORM框架使用的不同修改了部分逻辑。 集成 Sa-Token、Mybatis-Flex、PowerJob、Jackson、SpringDoc、Hutool、OSS 定期同步等

License: MIT License

Dockerfile 0.12% Java 87.60% Batchfile 0.12% Shell 0.13% TSQL 12.04%
mybatis-flex ruoyi-vue-plus-flex ruoyi-plus ruoyi-vue-plus ruoyi-flex

ruoyi-vue-flex's Introduction


简介

码云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

预览图

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.