ruoyi-admin和ruoyi-vue3笔记-gl-wms物流管理项目

gl-wms物流管理项目

部署## 所需软件

1、JDK:8+

安装包:Java Archive Downloads - Java SE 8

安装文档:Windows环境下JDK安装与环境变量配置详细的图文教程-腾讯云开发者社区-腾讯云

2、Redis 3.0+

安装包:Releases · microsoftarchive/redis · GitHub

安装文档:在 windows 上安装 Redis

3、Maven 3.0+

安装文档:https://www.cnblogs.com/liuhongfeng/p/5057827.html

安装包:Index of /dist/maven/maven-3/3.9.1/binaries

4、MYSQL 5.7+

安装文档:在windows server 2012 r2中安装mysql的详细步骤_win服务器_脚本之家

安装包:MySQL :: Download MySQL Community Server (Archived Versions)

5、Nginx

安装包:nginx: download

安装文档:Nginx Windows详细安装部署教程-阿里云开发者社区

6、Node

不需要安装到服务器,运维本地安装就行,主要是用来编译前端代码的

安装包:Node.js — 下载 Node.js®

安装文档:https://www.liaoxuefeng.com/wiki/1022910821149312/1023025597810528

7、IntelliJ IDEA 2024.1

后端开发工具

8、Visual Studio Code

前端开发工具

黑马源码地址

软件环境:JDK、MySQL、Redis、Maven、Node 技术选型:Spring Boot、 Spring Security、MyBatis、Jwt、Vue3、Element-Plus

官方地址:RuoYi-Vue: 🎉 基于SpringBoot,Spring Security,JWT,Vue & Element 的前后端分离权限管理系统,同时提供了 Vue3 的版本 扩展地址:RuoYi-Vue3: 🎉 (RuoYi)官方仓库 基于SpringBoot,Spring Security,JWT,Vue3 & Vite、Element Plus 的前后端分离权限管理系统

文档地址(现在学习的文档)

RuoYi-Vue · 语雀

项目构成

后端:GLWMS

前端:GLWMS-UI

部署开发环境

安装软件

安装和配置java

安装和配置mysql

安装和配置redis

安装和配置MAVEN

安装idea(admin的开发)

安装Node.js

安装vscode(ui的开发)

  idea本地maven设置

maven配置阿里云镜像

配置mysql和redis

编辑src/main/resources目录下的

  • application.yml的# redis 配置
  • application-druid.yml的# 数据源配置

后端启动

IntelliJ IDEA 2024.1中导入GLWMS文件夹

自动加载Maven依赖包,初次加载会比较慢(根据自身网络情况而定)

  • 打开项目运行com.gl.GlApplication.java(项目设置中的application名称需要区分大小写)
  • 出现如下图表示启动成功。
(♥◠‿◠)ノ゙  启动成功   ლ(´ڡ`ლ)゙  
 .-------.       ____     __        
 |  _ _   \      \   \   /  /    
 | ( ' )  |       \  _. /  '       
 |(_ o _) /        _( )_ .'         
 | (_,_).' __  ___(_ o _)'          
 |  |\ \  |  ||   |(_,_)'         
 |  | \ `'   /|   `-'  /           
 |  |  \    /  \      /           
 ''-'   `'-'    `-..-'    

前端启动

Visual Studio Code中打开GLWMS-UI

  • 打开终端
  • 运行npm install(用阿里云镜像比较快),然后启动项目npm run dev
# 安装依赖
npm install

# 强烈建议不要用直接使用 cnpm 安装,会有各种诡异的 bug,可以通过重新指定 registry 来解决 npm 安装速度慢的问题。
npm install --registry=https://registry.npmmirror.com

# 本地开发 启动项目
npm run dev

git设置

安装git

项目目录打开cmd

git init

#链接远程仓库
git remote add origin https://gitee.com/tzybds/glwms.git

#查看远程仓库链接
git remote -v

#将当前目录下所有已修改或新增的文件添加到暂存区(也称为索引)
git add .

#检查 Git 仓库中文件的状态
git status

#创建一个新的提交,将暂存区中的更改保存到仓库历史中
git commit -m "首次提交"


#
git push -u origin "master"
如果报错


这段文本显示了两个 Git 命令的结果,以及它们产生的错误信息。让我们逐个分析这些错误:

第一条命令是 git push -u origin master,它试图将本地的 "master" 分支推送到远程仓库。然而,Git 返回了一条错误消息,表示这次推送被拒绝了,因为本地的 "master" 分支落后于远程仓库的 "master" 分支。换句话说,远程仓库有一些本地没有的更新。为了整合这些远程变化,你需要先拉取远程仓库的更新,然后再尝试推送。
接下来,用户尝试执行 git pull 命令以获取远程仓库的最新更新。然而,Git 提示说当前分支没有跟踪信息,需要指定要合并的远程分支。这是因为该用户还没有设置本地分支与远程分支之间的追踪关系。在这种情况下,Git 需要知道应该从哪个远程分支拉取更新。
根据上述错误信息,解决这些问题的方法如下:

使用 git fetch 获取远程仓库的最新更新,而不是直接拉取并合并。这可以避免立即合并带来的问题,因为你可以在查看更新后再决定是否合并。
使用 git merge origin/master 合并远程仓库的 "master" 分支到本地的 "master" 分支。这将使本地分支与远程分支同步。
如果你想设置追踪关系,可以按照 Git 的提示操作,即运行 git branch --set-upstream-to=origin/master master。这将设置本地 "master" 分支与远程 "master" 分支之间的追踪关系,使得未来的 git pull 和 git push 操作更加方便。
综上所述,解决问题的步骤应该是:

执行 git fetch 获取远程仓库的更新。
执行 git merge origin/master 合并远程更新到本地分支。
(可选)执行 git branch --set-upstream-to=origin/master master 设置追踪关系。

 文件结构

#后端结构

├── common            // 工具类
│       └── annotation                    // 自定义注解
│       └── config                        // 全局配置
│       └── constant                      // 通用常量
│       └── core                          // 核心控制
│       └── enums                         // 通用枚举
│       └── exception                     // 通用异常
│       └── filter                        // 过滤器处理
│       └── utils                         // 通用类处理
├── framework         // 框架核心
│       └── aspectj                       // 注解实现
│       └── config                        // 系统配置
│       └── datasource                    // 数据权限
│       └── interceptor                   // 拦截器
│       └── manager                       // 异步处理
│       └── security                      // 权限控制
│       └── web                           // 前端控制
├── ruoyi-generator   // 代码生成(可移除)
├── ruoyi-quartz      // 定时任务(可移除)
├── ruoyi-system      // 系统代码
├── ruoyi-admin       // 后台服务
├── ruoyi-xxxxxx      // 其他模块

#前端结构

├── build                      // 构建相关  
├── bin                        // 执行脚本
├── public                     // 公共文件
│   ├── favicon.ico            // favicon图标
│   └── index.html             // html模板
│   └── robots.txt             // 反爬虫
├── src                        // 源代码
│   ├── api                    // 所有请求
│   ├── assets                 // 主题 字体等静态资源
│   ├── components             // 全局公用组件
│   ├── directive              // 全局指令
│   ├── layout                 // 布局
│   ├── plugins                // 通用方法
│   ├── router                 // 路由
│   ├── store                  // 全局 store管理
│   ├── utils                  // 全局公用方法
│   ├── views                  // view
│   ├── App.vue                // 入口页面
│   ├── main.js                // 入口 加载组件 初始化等
│   ├── permission.js          // 权限管理
│   └── settings.js            // 系统配置
├── .editorconfig              // 编码格式
├── .env.development           // 开发环境配置
├── .env.production            // 生产环境配置
├── .env.staging               // 测试环境配置
├── .eslintignore              // 忽略语法检查
├── .eslintrc.js               // eslint 配置项
├── .gitignore                 // git 忽略项
├── babel.config.js            // babel.config.js
├── package.json               // package.json
└── vue.config.js              // vue.config.js

利用AI生成表结构的设计

你是一位软件工程师,帮我生成MySQL的表结构 需求如下: 1,区域表,表名tb_region,字段有主键id、区域名称 2,合作商表,表名tb_partner,字段有主键id、合作商名称、联系人、联系电话、分成比例(int类型)、账号、密码 3,点位表,表名tb_node,字段有主键id、点位名称、详细地址、商圈类型(int类型) 其他要求: 1,每张表中都有创建时间(create_time)、修改时间(date_time)、创建人(create_by)、修改人(update_by)、备注(remark)这些字段 2,每张表的主键都是自增的 3,区域与点位是一对多的关系,合作商与点位是一对多的关系,请用字段表示出来,并建立外键约束 4,请为每个字段都添加上comment 5,帮我给生成的表中插入一些北京城市相关区域、点位、合作商的测试数据

你是一位软件工程师,帮我生成MySQL的表结构 需求如下: 1,物流信息表,表名wms_logistics,字段有主键id、部门、发货情况(int类型)、厂家单号、随货(int类型)、发货人、收货单位、收货人、收货人手机、收货地址、件数、创建时间(create_time)、修改时间(date_time)、创建人(create_by)、修改人(update_by)、备注(remark)。

主键自增,请为每个字段都添加上comment 帮我给生成的表中插入5条长沙物流的收货人、收货地址、厂家单号的测试数据

代码生成

新建数据库表

导入代码生成

生成代码

导入后端

IntelliJ IDEA 2024.1中选中父路径新建maven模块glwms-wms

  • 复制ruoyi.main到src.main

  • glwms-wms.pom中加入代码
    <!-- 通用工具-->
    <dependencies>
        <!-- 通用工具-->
        <dependency>
            <groupId>com.glwms</groupId>
            <artifactId>glwms-common</artifactId>
        </dependency>
    </dependencies>
  • 父路径GLWMS.pom和glwms-admin.pom中加入代码
            <!-- wms模块-->
            <dependency>
                <groupId>com.glwms</groupId>
                <artifactId>glwms-wms</artifactId>
                <version>${glwms.version}</version>
            </dependency>

  • 打开MAVEN,执行clean

  • 重新启动后端

导入前端

  1. 导入api
  2. 导入vue


 


 

顶部导航栏Navbar

  • 删除部分默认工具栏

代码所在位置 src-->layout-->component-->Navbar.vue

<div class="right-menu">
  <template v-if="device!=='mobile'">
  //注释掉不需要的工具栏位
<!--        <search id="header-search" class="right-menu-item" />-->
<!--        <el-tooltip content="源码地址" effect="dark" placement="bottom">-->
<!--          <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />-->
<!--        </el-tooltip>-->
<!--        <el-tooltip content="文档地址" effect="dark" placement="bottom">-->
<!--          <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />-->
<!--        </el-tooltip>-->
<!--        <screenfull id="screenfull" class="right-menu-item hover-effect" />-->
<!--        <el-tooltip content="布局大小" effect="dark" placement="bottom">-->
<!--          <size-select id="size-select" class="right-menu-item hover-effect" />-->
<!--        </el-tooltip>-->
</template>
  • 修改默认头像

代码所在位置:src-->store-->modules-->user.js 替换profile.jpg图片即可

// 获取用户信息
    GetInfo({ commit, state }) {
      return new Promise((resolve, reject) => {
        getInfo().then(res => {
          const user = res.user
          //修改@/assets/images/profile.jpg可以修改默认头像
          const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
          if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
            commit('SET_ROLES', res.roles)
            commit('SET_PERMISSIONS', res.permissions)
          } else {
            commit('SET_ROLES', ['ROLE_DEFAULT'])
          }
          commit('SET_ID', user.userId)
          commit('SET_NAME', user.userName)
          commit('SET_AVATAR', avatar)
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
  • 不显示tagsview

代码所在位置:src-->settings.js 设置tagsView属性为false即可。


 

项目部署

我们需要一种简单快捷的部署方式,并且尽量减少依赖数量,所以采用打包的方式:

后端:

安装和配置java
  • 新建JAVA_HOME变量         D:\kami\glwms\prod\jdk1.8
  • 修改系统变量中的path变量      %JAVA_HOME%\bin
安装小皮面板
  • 安装mysql和redis
  • 配置mysql和redis的用户和密码
安装Navicat
用Navicat配置mysql
  • 新建数据库glwms
  • 导入glwms.sql
打包后端jar,确认admin的配置(mysql和redis配置)
  • 在admin项目的bin目录下执行package.bat打包Web工程,生成war/jar包件。

数据库:

#请注意,句末除了运行sql外都要加;
mysql -u root -p; # 然后输入密码,连接数据库
show databases; # 显示数据库
create database ry_vue;  # 这里改了名字,因为数据库不推荐-,所以换成了_,注意java中的配置文件也要改过来
use ry_vue # 使用咱们的数据库
source C:\test.sql # 运行sql文件,使用绝对路径,请注意,这个语句结尾是不加分号的,否则会报错

#如果使用了sql的客户端,并且sql客户端编码有问题,可以修改客户端编码为utf8 
set names utf8;  # 将客户端字符集变成utf-8

前端:

前端打包dist

安装小皮面板,面板中安装ngnix

# 打包正式环境
npm run build:prod
###小皮面板的NGNIX配置
##面板安装NGNIX
##新建网站(名称随便,一般是域名kami.com),配置默认即可,设置端口号(不要80,方便端口映射)路径选择dist目录"C:/phpstudy_pro/WWW/kami.com/dist"
##打开小皮的设置-配置文件-vhosts-conf选择kami.com的conf,配置修改:



server {
        listen        6656;
        server_name  glwms;
        root   "D:/phpstudy_pro/WWW/dist";
        location / {
            index index.php index.html error/index.html;
###主要是这两行
root   "D:/phpstudy_pro/WWW/dist";
try_files $uri $uri/ /index.html;

            error_page 400 /error/400.html;
            error_page 403 /error/403.html;
            error_page 404 /error/404.html;
            error_page 500 /error/500.html;
            error_page 501 /error/501.html;
            error_page 502 /error/502.html;
            error_page 503 /error/503.html;
            error_page 504 /error/504.html;
            error_page 505 /error/505.html;
            error_page 506 /error/506.html;
            error_page 507 /error/507.html;
            error_page 509 /error/509.html;
            error_page 510 /error/510.html;
            include D:/phpstudy_pro/WWW/dist/nginx.htaccess;
            autoindex  off;
        }
        location ~ \.php(.*)$ {
            fastcgi_pass   127.0.0.1:9005;
            fastcgi_index  index.php;
            fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  PATH_INFO  $fastcgi_path_info;
            fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
            include        fastcgi_params;
        }
###加上这个
       location /prod-api/ {
            proxy_set_header Host $http_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header REMOTE-HOST $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_pass http://localhost:8080/;
        }
}

以下部分是个坐标,暂时用不到

将dist文件放入到nginx中,在nginx根目录下新建一个project文件(不新建也可以,对应修改配置文件即可),然后将dist文件复制到project:

修改一下配置文件,让咱们的项目顺利跑在nginx中:

运行nginx.exe启动nginx,会有黑框一闪而过,如果windows系统想关闭所有的nginx进程,运行:

taskkill /f /t /im nginx.exe

启动成功后,浏览器输入localhost即可访问:

运行

运行项目步骤:

1.先运行后端项目,找到ruoyi-admin.jar的文件夹,在这个文件夹下打开控制台,可以将当前文件夹路径改为cmd,然后按回车,进入控制台后,启动后端项目,输入java -jar ruoyi-admin.jar, 项目名ruoyi-admin.jar可以用tab键自动提示

2.启动redis,进入redis的文件夹,单击redis-server.exe即可启动

3.启动前端项目,进入nginx文件夹,单击nginx.exe

4.访问项目,进入浏览器,输入localhost,即可访问,管理员用户,用户名admin,密码admin123

RUOYI扩展项目

名称说明

地址

RuoYi-Vue3RuoYi-Vue的前端(Vue3 Element Plus Vite)版本https://github.com/yangzongzhuan/RuoYi-Vue3
RuoYi-AppRuoYi-Vue的移动端版本https://gitee.com/y_project/RuoYi-App
RuoYi-Vue-fastRuoYi-Vue单应用版本https://github.com/yangzongzhuan/RuoYi-Vue-fast
RuoYi-Vue-OracleRuoYi-Vue的Oracle版本https://github.com/yangzongzhuan/RuoYi-Vue-Oracle
RuoYi-Vue-Activiti集成Activiti 6.x工作流版本https://gitee.com/smell2/ruoyi-vue-activiti
RuoYi-Vue-Process闲鹿工作流版本https://gitee.com/calvinhwang123/RuoYi-Vue-Process
RuoYi-Vue-Flowable集成Flowable 6.x工作流版本https://gitee.com/tony2y/RuoYi-flowable
RuoYi-Vue-AntdvRuoYi-Vue的纯前端Antdv版本https://gitee.com/fuzui/RuoYi-Antdv
RuoYi-Vue-VbenRuoYi-Vue的纯前端Vben版本https://gitee.com/dapppp/RuoYi-Vben
RuoYi-AiDex-SharpRuoYi-Vue的纯前端Antdv版本,重点进行了UI升级美化等https://gitee.com/big-hedgehog/aidex-sharp
RuoYi-Vue-SqlserverRuoYi-Vue的Sqlserver版本,集成CAS、P6spy等https://gitee.com/MaShangYouLi/RuoYi-Vue-SQLServer-C
RuoYi-Vue-SqlserverRuoYi-Vue的Sqlserver版本https://gitee.com/wpp011/RuoYi-Vue-SQLServer
RuoYi-Vue-SqlserverRuoYi-Vue的Sqlserver版本https://gitee.com/Sxile/RuoYi-Vue-Sqlserver
RuoYi-Vue-ReactRuoYi-Vue的React版本https://gitee.com/whiteshader/ruoyi-react
RuoYi-Vue-NETRuoYi-Vue的.NET5版本https://gitee.com/izory/ZrAdminNetCore
RuoYi-Vue3-NETRuoYi-Vue3的.NET6版本https://gitee.com/ccnetcore/yi
RuoYi-Vue-nestjsRuoYi-Vue的nestjs版本https://gitee.com/tao-zhi/nest-admin
RuoYi-Vue-FastAPIRuoYi-Vue的FastAPI版本https://gitee.com/insistence2022/RuoYi-Vue-FastAPI
RuoYi-Vue3-FastAPIRuoYi-Vue3的FastAPI版本https://gitee.com/insistence2022/RuoYi-Vue3-FastAPI
RuoYi-Vue-RustRuoYi-Vue的Rust版本https://github.com/mengyou658/actix_admin
RuoYi-Vue-RustRuoYi-Vue的Rust版本https://gitee.com/wizount/ruoyi-rust
RuoYi-Geek-SpringBoot3集成SpringBoot3、MybatisPlus、支付模块、第三方认证等https://gitee.com/geek-xd/ruoyi-geek-springboot3
RuoYi-Vue-Plus集成Mybatis-Plus、Hutool、OSS存储、分布式锁等组件https://gitee.com/dromara/RuoYi-Vue-Plus
RuoYi-Vue-PlusRuoYi-Vue的腾讯开源框架TDesign UI框架https://gitee.com/zhangmrit/RuoYi-Vue-Plus
RuoYi-Vue-TDesignRuoYi-Vue-Plus的腾讯开源框架TDesign UI框架https://gitee.com/yixiacoco/ruoyi-tdesign
RuoYi-AiDex-lmwRuoYi-Vue的ui美化版本,重点进行前端重构https://gitee.com/codelm/ruoyi-vue3-lmw
RuoYi-Vue-AutoEERuoYi-Vue的Vite、ant-design-vue3版本https://gitee.com/Double_AutoEE/AutoEE
RuoYi-Vue-Flex集成MyBatis-Flex、JDK17、Sa-Token、PowerJob等组件https://gitee.com/dataprince/ruoyi-flex
RuoYi-Vue-UUID集成Mybatis-Plus、Sa-Token、PowerJob等组件https://gitee.com/qibutian/ruoyi-my-batis-plus-uuid
RuoYi-Vue-Super集成Websocket、Flowable、Xdh-Map、可视化开发等组件https://gitee.com/rainsuper/RuoYi-Vue-Super
RuoYi-Vue-Source集成Flowable、Websocket、报表、支付等组件的零代码版本https://gitee.com/open-source-byte/source-vue
RuoYi-Vue-Nocode集成Activiti7、Mongodb、Form-Making等组件的零代码版本https://gitee.com/atlus/ruoyi-vue-nocode
RuoYi-Vue-Plus-Activiti集成的activiti工作流版本https://gitee.com/sgs98/RuoYi-Vue-Plus-Activiti
RuoYi-Vue-Plus-Flowable集成的flowable工作流版本https://gitee.com/KonBAI-Q/ruoyi-flowable-plus
RuoYi-Vue-FlyFlow集成的flowable类钉钉飞书工作流版本https://gitee.com/junyue/flyflow/tree/springboot3-ruoyi
RuoYi-Vue-YuXi集成Sa-Token、magic-api、Hutool 等组件https://gitee.com/histoneUp/yu-xi-admin
RuoYi-Vue-Tool实现低代码功能、页面水印,支持功能号动态建立业务等功能https://gitee.com/xinjiangwangwei/ruoyi-tool
RuoYi-Vue-S集成Mybatis-Plus、多租户、动态数据权限、OSS云存储等组件https://gitee.com/sunseagear/RuoYi-Vue-S
RuoYi-Vue-MultiTenantRuoYi-Vue的多租户版本https://gitee.com/leslie8195/ruo-yi-vue-multi-tenant
RuoYi-Vue-SaTokenRuoYi-Vue的SaToken版本https://gitee.com/wangming123456/ruoyi-satoken
RuoYi-Vue3-TsRuoYi-Vue3的Ts版本https://gitee.com/lyforvue/ruoyi_vue3_ts
RuoYi-Vue3-TsRuoYi-Vue3的Ts版本https://github.com/zzh948498/RuoYi-Vue3-ts
RuoYi-Vue-MobileRuoYi-Vue的移动端Uniapp版本,集成uView2.0+u-charts等组件https://gitee.com/yinm/RuoYi-Mobile
RuoYi-Vue-UniappRuoYi-Vue的移动端Uniapp版本https://gitee.com/big-hedgehog/ruoyi-uniapp
RuoYi-Vue-FlutterRuoYi-Vue的移动端Flutter版本https://github.com/420136525/ruoyi_flutter_app
RuoYi-Vue-UniappRuoYi-Vue的移动端Uniapp版本包括权限认证、字典翻译等https://gitee.com/_q494000616q_/ruoyi-uniapp
RuoYi-Mybatis-Plus-JoinRuoYi-Vue的Mybatis-Plus-Join,集成权限框架Sa-Tokenhttps://gitee.com/Duke_yzl/RuoYi-Vue
RuoYi-R2dbcRuoYi-Vue的R2dbc版本https://gitee.com/sn-yang/ruoyi-webflux-r2dbc-vue3
RuoYi-Vue-HibernateRuoYi-Vue的Hibernate版本https://gitee.com/inprise80/ruoyi-vue-hibernate2
RuoYi-SqliteRuoYi-Vue的Sqlite版本https://gitee.com/lucky__jie/RuoYi-Sqlite
RuoYi-SqliteRuoYi-Vue的Sqlite版本https://gitee.com/tianyv/ruoyi-sqlite3
RuoYi-JpaRuoYi-Vue的jpa版本https://gitee.com/bright-sword-40/ruoyi-jpa
RuoYi-damengRuoYi-Vue的达梦DM8的版本https://gitee.com/azun/ruoyi-dameng
RuoYi-hgdbRuoYi-Vue的瀚高数据库版本https://gitee.com/ruralqiu/ruo-yi-vue-hgdb-master
RuoYi-shentongRuoYi-Vue的神通数据库版本https://gitee.com/xgzh-boom/ruo-yi-vue-shentong
RuoYi-metaeeRuoYi-Vue + MybatisPlus + dynamic-datasource + Knife4j等https://gitee.com/metaee/metaee-boot
RuoYi-Mybatis-PlusRuoYi-Vue + MybatisPlus 纯净版、项目全栈脚手架https://gitee.com/tellsea/ruoyi-vue-plus
RuoYi-Mybatis-PlusRuoYi-Vue + MybatisPlus + Lombok + 国产数据库适配https://gitee.com/sou100/ruoyi-mybatis-plus
RuoYi-Vue-Plus-SqlserverRuoYi-Vue + MybatisPlus + Sqlserver版本https://gitee.com/qu_bing/ruoyi-vue-plus-sqlserver
RuoYi-Vue-Plus-TdengineRuoYi-Vue + MybatisPlus + Tdengine版本https://gitee.com/zhangbg/ruoyi-plus-tdengine
RuoYi-Vue-FluentMyBatisRuoYi-Vue版,集成Fluent-Mybatis,适配代码生成器https://lemonbx.coding.net/public/ruoyi/ruoyi-vue-fluentmybatis/git
RuoYi-Vue-tkmapperRuoYi-Vue的tk.mapper版本https://gitee.com/caiwl_admin/ruoyi-vue-tkmapper
RuoYi-Vue-Nway-JDBCRuoYi-Vue的Nway-JDBC版本https://gitee.com/nway/RuoYi-Vue/tree/nway
RuoYi-Vue-NutzRuoYi-Vue的Nutz框架版本https://github.com/TomYule/ruoyi-vue-nutz
RuoYi-Vue-Postgresql-ElectronRuoYi-Vue的Postgresql的桌面版,要集成了web桌面打印https://gitee.com/suxia2/ruo-yi-vue-postgresql-electron
RuoYi-Vue-PostgresqlRuoYi-Vue的Postgresql版本https://gitee.com/suxia2/RuoYi-Vue-Postgresql
RuoYi-Vue-PostgresqlRuoYi-Vue的Postgresql版本https://gitee.com/cheenmo/ruoyi-vue-pg
RuoYi-Vue-PostgresqlRuoYi-Vue的Postgresql版本https://gitee.com/p0mp0k0/RuoYi-Vue-Postgresql
RuoYi-Vue-PostgresqlRuoYi-Vue的Postgresql版本https://github.com/Mr8god/RuoYi-Vue-PostgreSQL
RuoYi-Vue-Solon基于若依Solon框架版本,集成Sa-Token、MyBatis-Flex等组件https://gitee.com/min290/warm-sun
RuoYi-Vue-Python基于若依Python语言版本https://gitee.com/mengyinggitee/sanic-vue-admin
RuoYi-Vue-Python基于若依Python语言版本https://gitee.com/liqianglog/django-vue-admin/tree/v1.1.2
RuoYi-Vue-Go基于若依Go语言版本https://gitee.com/tiger1103/gfast/tree/os-v2
RuoYi-Vue3-Go基于RuoYi-Vue3的Go语言版本https://gitee.com/smell2/BaiZe
RuoYi-Vue3-go-kratos基于RuoYi-Vue的的go-kratos版本https://github.com/ut1221/micro-go
RuoYi-Vue3-vuecli基于RuoYi-Vue3的vue-cli版本https://gitee.com/cicada-singing/ruoyi-vue3-cli
RuoYi-Vue-egg基于RuoYi-Vue的egg框架版本https://gitee.com/zhumingmark/ruoyi-egg
RuoYi-Vue-XxlJob基于RuoYi-Vue的xxl-job定时任务版本https://gitee.com/chenlq618/RuoYi-Vue-Xxl-Job
RuoYi-Vue-wind集成Mybatis-Plus、shardingsphere、lombok等组件https://gitee.com/zhangmrit/RuoYi-Vue
RuoYi-Vue-Ks集成Mybatis-Plus、knife4j、Hutool、lombok等组件https://gitee.com/xieke90/RuoYi-Vue-Ks
RuoYi-Vue-Mybatis-plus集成Mybatis-Plus、EasyCaptcha、lombok及模块调整https://gitee.com/nottyjay/ruoyi-vue-mybatis-plus
RuoYi-Vue-BeetlSql集成Lombok+BeetlSql3.X+Undertowhttps://gitee.com/JavaLionLi/RuoYi-Vue-BeetlSql
RuoYi-Vue-Keycloak集成了keycloak单点登录功能https://gitee.com/greetings_gitee/RuoYiVueKeycloak
RuoYi-Vue3-Cas集成了RuoYi-Vue3 + CAS5.3.16单点登录功能https://gitee.com/mikulove666/ruoyi-vue-cas
RuoYi-Vue-Cas集成了spring-security-cas单点登录功能https://gitee.com/ggxforever/RuoYi-Vue-cas
RuoYi-Vue-Kotlin集成RuoYi-Vue的Kotlin版本https://gitee.com/gongzhengfeng/ruoyi-vue-kotlin
RuoYi-Vue-Gradle集成Gradle + Kotlin版本https://gitee.com/yizems/RuoYi-Vue/tree/gradle-kotlin
RuoYi-Vue-Node采用Midwayjs框架研发Node服务端体验https://gitee.com/TsMask/mask_api_midwayjs
RuoYi-Antdv-Flowable-plus美化Antv + MybatisPlus + Flowable版本https://gitee.com/lwq8886666/ruo-yi-antdv-flowable-plus
RuoYi-Vue-UUIDRuoYi-Vue修改主键为UUID版本https://gitee.com/allen056/ruo-yi-vue-uuid
RuoYi-Vue_Oauth2.0集成Oauth2.0实现登录,认证授权https://pan.baidu.com/s/1OVgEAe9mwBc6kkKHxX8ZCA(提取码: c475)
RuoYi-Vue-Atomikos集成atomikos分布式事务https://gitee.com/zsiyang/ruoyi-vue-atomikos
RuoYi-Vue-Report集成数据大屏、地图示例(热力图、区域图、检索等)https://gitee.com/greenant/Ruoyi-vue-Report
RuoYi-Vue-Process基于闲鹿工作流版本的扩展https://gitee.com/laya1989/ruo-yi-vue-process-3.4.0
RuoYi-Vue-YunaiV集成文件服务、apollo、监控、分布式锁等组件https://github.com/YunaiV/ruoyi-vue-pro
RuoYi-Vue-Swagger集成Swagger-bootstrap-ui,支持代码生成Api...https://gitee.com/juniorRay/ruoyi-vue-swagger
RuoYi-Vue-GoogleTotp集成google authenticator,支持角色树形模式...https://gitee.com/richardgong1987/RuoYi-baby
RuoYi-Vue-expand集成Ureport2、积木报表、雪花主键https://gitee.com/magb/ruoyi-vue-expand
RuoYi-Vue-JFinal集成JFinal作为web框架https://gitee.com/ycss/habit
RuoYi-Vue-mqtt集成mqtt作为消息队列https://github.com/gujiniCY/ruoyi-vue-mqtt
RuoYi-hh-vue集成Satoken、MybatisPlus、MybatisFlex、多租户,自研工作流https://gitee.com/min290/hh-vue
RuoYi-mymx2基于若依核心工具包、自动配置、多租户https://gitee.com/mymx2/RuoYi-Vue
RuoYi-Vue-style基于若依改造模块层次、数据传输校验,mapstruct对象转换等https://gitee.com/todostyle/style-vue
RuoYi-Tellsea基于若依的Java全栈脚手架https://gitee.com/tellsea/project-system
RuoYi-Vue-uniapp-wx基于若依后台管理系统的微信小程序https://gitee.com/rahman/AbuCoder-RuoYi-Vue-uniapp-wx
RuoYi-Vue-wechat-mp集成公众号模板,微信网页授权认证https://gitee.com/suimu/ruoyi-wechat-mp
RuoYi-Vue-DocHub基于RuoYi-Vue的在线写作平台,支持多种文档类型编辑或分享https://gitee.com/Ning310975876/ruo-yi-vue-docHub
RuoYi-Vue-Blog基于RuoYi-Vue的博客网站https://gitee.com/Ning310975876/ruo-yi-vue-blog
RuoYi-Vue-KMS基于RuoYi-Vue的知识管理系统https://gitee.com/chenzuheng001/ruo-yi-vue-kms-backup
RuoYi-Vue-MES基于RuoYi-Vue的MES生产执行管理系统https://gitee.com/kutangguo/ktg-mes
RuoYi-Vue-CMS基于RuoYi-Vue的CMS内容管理系统https://gitee.com/liweiyi/RuoYi-Vue-CMS
RuoYi-Vue-netdisk基于RuoYi-Vue的在线网盘系统https://gitee.com/hongmaple/netdisk
RuoYi-Shenbao-iot基于RuoYi-Vue的开源物联网基础平台https://gitee.com/jinanchang/Shenbao-iot
RuoYi-Vue-certificate基于RuoYi-Vue3+Ts的证书信息管理系统https://gitee.com/binyuling/ruoyi-vue3-ts-springboot-certificate-management
RuoYi-link-wechat基于人工智能的企业微信 SCRM 综合解决方案https://gitee.com/LinkWeChat/link-wechat
RuoYi-V-IM基于若依超轻量级聊天软件https://gitee.com/lele-666/V-IM
RuoYi-transport基于若依的物流转运小程序https://gitee.com/hongmaple/transport
RuoYi-easy-report基于若依在线Web报表工具平台https://gitee.com/devzwd/easy-report
RuoYi-wx基于若依微信管理平台https://gitee.com/joolun/JooLun-wx
RuoYi-wxopen基于若依微信服务商平台https://gitee.com/mxiaoguang/wxopen
RuoYi-kwswitch基于若依智能开关平台https://gitee.com/kerwincui/kwswitch
RuoYi-ewem基于若依溯源防伪系统https://gitee.com/qrcode_project/ewem
RuoYi-zhunian基于若依支付系统https://gitee.com/zhunian/smart-pay-plus-vue
RuoYi-wumei基于若依智能家居系统https://gitee.com/kerwincui/wumei-smart
RuoYi-tanhuihuang基于若依电影视频系统https://gitee.com/tanhuihuang/ruoyi-media
RuoYi-knowledgegraph基于若依可视化知识图谱https://gitee.com/liaoquefei/knowledgegraph
RuoYi-tutor基于若依家教一体化平台https://github.com/zty-f/Tutor
RuoYi-mall基于若依电商管理系统https://gitee.com/zccbbg/RuoYi-Mall
RuoYi-Wms基于若依仓库管理系统https://gitee.com/zccbbg/wms-ruoyi
RuoYi-payshop基于若依多商户商城管理系统https://gitee.com/JiaGou-XiaoGe/payshop
RuoYi-shop基于若依和litemall的商城后台融合项目https://gitee.com/hgl168918/ruoyi-shop
RuoYi-crm基于若依平的多租户CRM系统https://gitee.com/jundee/RuoyiCRM
RuoYi-zhaoxinpms基于若依的智慧物业系统https://gitee.com/fanhuibin1/zhaoxinpms
RuoYi-community基于若依的智慧社区系统https://gitee.com/hebei-zhiyu-network/community-web
RuoYi-huohuzhihui基于若依的智慧园区一卡通https://gitee.com/huohuzhihui/ykt
RuoYi-manager基于若依的内部管理软件https://gitee.com/jetlion-software/zs-manager
RuoYi-WJ-ONE整合RuoYi-MES、RuoYi-CRM、RuoYi-Flowable等系统于一体https://gitee.com/vulcanw/wj-mes
RuoYi-Vue-SmsLogin集成短信登录功能https://github.com/chougui123/RuoYi-Vue-SmsLogin
RuoYi-fastbuild-factory若依框架包名修改器https://gitee.com/yinm/fastbuild-factory
RuoYi-common-tools若依框架包名修改器https://gitee.com/lpf_project/common-tools

 

导入导出

在实际开发中经常需要使用导入导出功能来加快数据的操作。在项目中可以使用注解来完成此项功能。 在需要被导入导出的实体类属性添加@Excel注解,目前支持参数如下:

#注解参数说明

参数类型默认值描述
sortintInteger.MAX_VALUE导出时在excel中排序,值越小越靠前
nameString导出到Excel中的名字
dateFormatString日期格式, 如: yyyy-MM-dd
readConverterExpString读取内容转表达式 (如: 0=男,1=女,2=未知)
separatorString,分隔符,读取字符串组内容
scaleint-1BigDecimal 精度 默认:-1(默认不开启BigDecimal格式化)
roundingModeintBigDecimal.ROUND_HALF_EVENBigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
celltypeEnumType.STRING导出类型(0数字 1字符串 2图片)
heightString14导出时在excel中每个列的高度 单位为字符
widthString16导出时在excel中每个列的宽 单位为字符
suffixString文字后缀,如% 90 变成90%
defaultValueString当值为空时,字段的默认值
promptString提示信息
comboStringNull设置只能选择不能输入的列内容
comboReadDictbooleanfalse是否从字典读数据到combo,默认不读取,如读取需要设置dictType注解.
headerBackgroundColorEnumIndexedColors.GREY_50_PERCENT导出列头背景色IndexedColors.XXXX
headerColorEnumIndexedColors.WHITE导出列头字体颜色IndexedColors.XXXX
backgroundColorEnumIndexedColors.WHITE导出单元格背景色IndexedColors.XXXX
colorEnumIndexedColors.BLACK导出单元格字体颜色IndexedColors.XXXX
targetAttrString另一个类中的属性名称,支持多级获取,以小数点隔开
isStatisticsbooleanfalse是否自动统计数据,在最后追加一行统计数据总和
typeEnumType.ALL字段类型(0:导出导入;1:仅导出;2:仅导入)
alignEnumHorizontalAlignment.CENTER导出对齐方式HorizontalAlignment.XXXX
handlerClassExcelHandlerAdapter.class自定义数据处理器
argsString[]{}自定义数据处理器参数

#导出实现流程

1、前端调用方法(参考如下)

// 查询参数 queryParams
queryParams: {
  pageNum: 1,
  pageSize: 10,
  userName: undefined
},

/** 导出按钮操作 */
handleExport() {
  this.download('system/xxxx/export', {
	...this.queryParams
  }, `post_${new Date().getTime()}.xlsx`)
}

2、添加导出按钮事件

<el-button
  type="warning"
  icon="el-icon-download"
  size="mini"
  @click="handleExport"
>导出</el-button>

3、在实体变量上添加@Excel注解

@Excel(name = "用户序号", prompt = "用户编号")
private Long userId;

@Excel(name = "用户名称")
private String userName;
	
@Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
private String sex;

@Excel(name = "最后登陆时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date loginDate;

4、在Controller添加导出方法

@Log(title = "用户管理", businessType = BusinessType.EXPORT)
@PreAuthorize(hasPermi = "system:user:export")
@PostMapping("/export")
public void export(HttpServletResponse response, SysUser user) throws IOException
{
	List<SysUser> list = userService.selectUserList(user);
	ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
	util.exportExcel(response, list, "用户数据");
}

#导入实现流程

参考导入实现流程

#自定义标题信息

参考自定义标题信息

#自定义数据处理器

参考自定义数据处理器

#自定义隐藏属性列

参考自定义隐藏属性列

#导出对象的子列表

参考导出对象的子列表

 

  • 9
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值