Coder Social home page Coder Social logo

monkey-captain / ruoyi-vue-flex Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yhan219/ruoyi-vue-flex

0.0 0.0 0.0 82.78 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

Shell 0.13% Java 87.60% Batchfile 0.12% Dockerfile 0.12% TSQL 12.04%

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

预览图

ruoyi-vue-flex's People

Contributors

javalionli avatar yangzongzhuan avatar zhonglingyuxiu1028 avatar shenxinquan avatar konbai-q avatar 18860852449 avatar richmoster avatar 819589789 avatar fengcms avatar bkywksj avatar ersb-cn avatar fuzui avatar lucky-ya-q avatar bleachtred avatar 3440626 avatar qq1822213252 avatar liyang1987jay avatar scmiot avatar youjieforgit avatar mroldx avatar asdfewafdsfds avatar er0sgg avatar flyfive0315 avatar jackytang avatar nguyendream avatar yuhong0206 avatar gaga-change avatar hmxmylove avatar sproutcat avatar wangzhaoqiang avatar

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.