@@ -42,6 +40,7 @@
import { getToken } from "@/utils/auth";
export default {
+ name: "FileUpload",
props: {
// 值
value: [String, Object, Array],
@@ -63,6 +62,7 @@ export default {
},
data() {
return {
+ baseUrl: process.env.VUE_APP_BASE_API,
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
headers: {
Authorization: "Bearer " + getToken(),
@@ -70,30 +70,35 @@ export default {
fileList: [],
};
},
+ watch: {
+ value: {
+ handler(val) {
+ if (val) {
+ let temp = 1;
+ // 首先将值转为数组
+ const list = Array.isArray(val) ? val : this.value.split(',');
+ // 然后将数组转为对象数组
+ this.fileList = list.map(item => {
+ if (typeof item === "string") {
+ item = { name: item, url: item };
+ }
+ item.uid = item.uid || new Date().getTime() + temp++;
+ return item;
+ });
+ } else {
+ this.fileList = [];
+ return [];
+ }
+ },
+ deep: true,
+ immediate: true
+ }
+ },
computed: {
// 是否显示提示
showTip() {
return this.isShowTip && (this.fileType || this.fileSize);
},
- // 列表
- list() {
- let temp = 1;
- if (this.value) {
- // 首先将值转为数组
- const list = Array.isArray(this.value) ? this.value : [this.value];
- // 然后将数组转为对象数组
- return list.map((item) => {
- if (typeof item === "string") {
- item = { name: item, url: item };
- }
- item.uid = item.uid || new Date().getTime() + temp++;
- return item;
- });
- } else {
- this.fileList = [];
- return [];
- }
- },
},
methods: {
// 上传前校检格式和大小
@@ -124,10 +129,6 @@ export default {
}
return true;
},
- // 文件个数超出
- handleExceed() {
- this.$message.error(`只允许上传单个文件`);
- },
// 上传失败
handleUploadError(err) {
this.$message.error("上传失败, 请重试");
@@ -135,12 +136,13 @@ export default {
// 上传成功回调
handleUploadSuccess(res, file) {
this.$message.success("上传成功");
- this.$emit("input", res.url);
+ this.fileList.push({ name: res.fileName, url: res.fileName });
+ this.$emit("input", this.listToString(this.fileList));
},
// 删除文件
handleDelete(index) {
this.fileList.splice(index, 1);
- this.$emit("input", '');
+ this.$emit("input", this.listToString(this.fileList));
},
// 获取文件名称
getFileName(name) {
@@ -149,11 +151,16 @@ export default {
} else {
return "";
}
+ },
+ // 对象转成分隔字符串
+ listToString(list) {
+ let files = "";
+ for (let key in list) {
+ files += list[key].url + ",";
+ }
+ return files.substr(0, files.length - 1);
}
- },
- created() {
- this.fileList = this.list;
- },
+ }
};
From e963a86b15583f0099380ae47b429b86be26f363 Mon Sep 17 00:00:00 2001
From: RuoYi
Date: Thu, 8 Jul 2021 15:48:11 +0800
Subject: [PATCH 35/62] =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E7=BC=96?=
=?UTF-8?q?=E8=BE=91=E7=BB=84=E4=BB=B6=E6=B7=BB=E5=8A=A0=E7=B1=BB=E5=9E=8B?=
=?UTF-8?q?=E5=B1=9E=E6=80=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-ui/src/components/Editor/index.vue | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/ruoyi-ui/src/components/Editor/index.vue b/ruoyi-ui/src/components/Editor/index.vue
index d63a48d1..8e616794 100644
--- a/ruoyi-ui/src/components/Editor/index.vue
+++ b/ruoyi-ui/src/components/Editor/index.vue
@@ -9,7 +9,7 @@
:headers="headers"
style="display: none"
ref="upload"
- v-if="this.uploadUrl"
+ v-if="this.type == 'url'"
>
@@ -46,14 +46,15 @@ export default {
type: Boolean,
default: false,
},
- /* 上传地址 */
- uploadUrl: {
+ /* 类型(base64格式、url格式) */
+ type: {
type: String,
default: "",
}
},
data() {
return {
+ uploadUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
headers: {
Authorization: "Bearer " + getToken()
},
@@ -119,7 +120,7 @@ export default {
const editor = this.$refs.editor;
this.Quill = new Quill(editor, this.options);
// 如果设置了上传地址则自定义图片上传事件
- if (this.uploadUrl) {
+ if (this.type == 'url') {
let toolbar = this.Quill.getModule("toolbar");
toolbar.addHandler("image", (value) => {
this.uploadType = "image";
@@ -165,7 +166,7 @@ export default {
// 获取光标所在位置
let length = quill.getSelection().index;
// 插入图片 res.url为服务器返回的图片地址
- quill.insertEmbed(length, "image", res.url);
+ quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
// 调整光标到最后
quill.setSelection(length + 1);
} else {
From e259093e01a924469ed599fd3311c5b2fc04d49b Mon Sep 17 00:00:00 2001
From: RuoYi
Date: Thu, 8 Jul 2021 15:49:04 +0800
Subject: [PATCH 36/62] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=B7=BB=E5=8A=A0=E6=95=B0=E9=87=8F=E9=99=90?=
=?UTF-8?q?=E5=88=B6=E5=B1=9E=E6=80=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-ui/src/components/FileUpload/index.vue | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/ruoyi-ui/src/components/FileUpload/index.vue b/ruoyi-ui/src/components/FileUpload/index.vue
index 649e0772..6e7992ad 100644
--- a/ruoyi-ui/src/components/FileUpload/index.vue
+++ b/ruoyi-ui/src/components/FileUpload/index.vue
@@ -4,7 +4,9 @@
:action="uploadFileUrl"
:before-upload="handleBeforeUpload"
:file-list="fileList"
+ :limit="limit"
:on-error="handleUploadError"
+ :on-exceed="handleExceed"
:on-success="handleUploadSuccess"
:show-file-list="false"
:headers="headers"
@@ -44,6 +46,11 @@ export default {
props: {
// 值
value: [String, Object, Array],
+ // 数量限制
+ limit: {
+ type: Number,
+ default: 5,
+ },
// 大小限制(MB)
fileSize: {
type: Number,
@@ -129,6 +136,10 @@ export default {
}
return true;
},
+ // 文件个数超出
+ handleExceed() {
+ this.$message.error(`上传文件数量不能超过 ${this.limit} 个!`);
+ },
// 上传失败
handleUploadError(err) {
this.$message.error("上传失败, 请重试");
From 6905522b91fd76d633e711e1084676b6e9ba9193 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?=
<15040126243@163.com>
Date: Thu, 8 Jul 2021 16:47:34 +0800
Subject: [PATCH 37/62] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20docker=20?=
=?UTF-8?q?=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docker/.env | 2 --
docker/docker-compose.yml | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
delete mode 100644 docker/.env
diff --git a/docker/.env b/docker/.env
deleted file mode 100644
index 8e947ae8..00000000
--- a/docker/.env
+++ /dev/null
@@ -1,2 +0,0 @@
-REGISTER=ruoyi
-TAG=2.4.0
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index 9ce9613d..f0f50191 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -78,7 +78,7 @@ services:
ipv4_address: 172.30.0.48
ruoyi-admin:
- image: "${REGISTER}/ruoyi-admin:${TAG}"
+ image: "ruoyi/ruoyi-admin:2.4.0"
environment:
- TZ=Asia/Shanghai
privileged: true
From f56da498ab4a174e2fe6c6562b36b3a7dcc81cea Mon Sep 17 00:00:00 2001
From: RuoYi
Date: Thu, 8 Jul 2021 19:17:09 +0800
Subject: [PATCH 38/62] =?UTF-8?q?ImageUpload=E7=BB=84=E4=BB=B6=E6=94=AF?=
=?UTF-8?q?=E6=8C=81=E5=A4=9A=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-ui/src/components/FileUpload/index.vue | 13 +-
ruoyi-ui/src/components/ImageUpload/index.vue | 202 ++++++++++++++----
ruoyi-ui/src/components/TopNav/index.vue | 4 +-
3 files changed, 165 insertions(+), 54 deletions(-)
diff --git a/ruoyi-ui/src/components/FileUpload/index.vue b/ruoyi-ui/src/components/FileUpload/index.vue
index 6e7992ad..bdbb0694 100644
--- a/ruoyi-ui/src/components/FileUpload/index.vue
+++ b/ruoyi-ui/src/components/FileUpload/index.vue
@@ -163,13 +163,14 @@ export default {
return "";
}
},
- // 对象转成分隔字符串
- listToString(list) {
- let files = "";
- for (let key in list) {
- files += list[key].url + ",";
+ // 对象转成指定字符串分隔
+ listToString(list, separator) {
+ let strs = "";
+ separator = separator || ",";
+ for (let i in list) {
+ strs += list[i].url + separator;
}
- return files.substr(0, files.length - 1);
+ return strs != '' ? strs.substr(0, strs.length - 1) : '';
}
}
};
diff --git a/ruoyi-ui/src/components/ImageUpload/index.vue b/ruoyi-ui/src/components/ImageUpload/index.vue
index ce540eb8..062e27d4 100644
--- a/ruoyi-ui/src/components/ImageUpload/index.vue
+++ b/ruoyi-ui/src/components/ImageUpload/index.vue
@@ -5,33 +5,38 @@
list-type="picture-card"
:on-success="handleUploadSuccess"
:before-upload="handleBeforeUpload"
+ :limit="limit"
:on-error="handleUploadError"
+ :on-exceed="handleExceed"
name="file"
- :show-file-list="false"
+ :on-remove="handleRemove"
+ :show-file-list="true"
:headers="headers"
- style="display: inline-block; vertical-align: top"
+ :file-list="fileList"
+ :on-preview="handlePictureCardPreview"
+ :class="{hide: this.fileList.length >= this.limit}"
>
-
-
-
-
-
-
+
-
-
+
+
+
+ 请上传
+ 大小不超过 {{ fileSize }}MB
+ 格式为 {{ fileType.join("/") }}
+ 的文件
+
+
+
+
@@ -40,36 +45,128 @@
import { getToken } from "@/utils/auth";
export default {
+ props: {
+ value: [String, Object, Array],
+ // 图片数量限制
+ limit: {
+ type: Number,
+ default: 5,
+ },
+ // 大小限制(MB)
+ fileSize: {
+ type: Number,
+ default: 5,
+ },
+ // 文件类型, 例如['png', 'jpg', 'jpeg']
+ fileType: {
+ type: Array,
+ default: () => ["png", "jpg", "jpeg"],
+ },
+ // 是否显示提示
+ isShowTip: {
+ type: Boolean,
+ default: true
+ }
+ },
data() {
return {
+ dialogImageUrl: "",
dialogVisible: false,
+ hideUpload: false,
+ baseUrl: process.env.VUE_APP_BASE_API,
uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
headers: {
Authorization: "Bearer " + getToken(),
},
+ fileList: []
};
},
- props: {
+ watch: {
value: {
- type: String,
- default: "",
+ handler(val) {
+ if (val) {
+ // 首先将值转为数组
+ const list = Array.isArray(val) ? val : this.value.split(',');
+ // 然后将数组转为对象数组
+ this.fileList = list.map(item => {
+ if (typeof item === "string") {
+ if (item.indexOf(this.baseUrl) === -1) {
+ item = { name: this.baseUrl + item, url: this.baseUrl + item };
+ } else {
+ item = { name: item, url: item };
+ }
+ }
+ return item;
+ });
+ } else {
+ this.fileList = [];
+ return [];
+ }
+ },
+ deep: true,
+ immediate: true
+ }
+ },
+ computed: {
+ // 是否显示提示
+ showTip() {
+ return this.isShowTip && (this.fileType || this.fileSize);
},
},
methods: {
- removeImage() {
- this.$emit("input", "");
+ // 删除图片
+ handleRemove(file, fileList) {
+ const findex = this.fileList.indexOf(file.name);
+ this.fileList.splice(findex, 1);
+ this.$emit("input", this.listToString(this.fileList));
},
+ // 上传成功回调
handleUploadSuccess(res) {
- this.$emit("input", res.url);
+ this.fileList.push({ name: res.fileName, url: res.fileName });
+ this.$emit("input", this.listToString(this.fileList));
this.loading.close();
},
- handleBeforeUpload() {
+ // 上传前loading加载
+ handleBeforeUpload(file) {
+ let isImg = false;
+ if (this.fileType.length) {
+ let fileExtension = "";
+ if (file.name.lastIndexOf(".") > -1) {
+ fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
+ }
+ isImg = this.fileType.some(type => {
+ if (file.type.indexOf(type) > -1) return true;
+ if (fileExtension && fileExtension.indexOf(type) > -1) return true;
+ return false;
+ });
+ } else {
+ isImg = file.type.indexOf("image") > -1;
+ }
+
+ if (!isImg) {
+ this.$message.error(
+ `文件格式不正确, 请上传${this.fileType.join("/")}图片格式文件!`
+ );
+ return false;
+ }
+ if (this.fileSize) {
+ const isLt = file.size / 1024 / 1024 < this.fileSize;
+ if (!isLt) {
+ this.$message.error(`上传头像图片大小不能超过 ${this.fileSize} MB!`);
+ return false;
+ }
+ }
this.loading = this.$loading({
lock: true,
text: "上传中",
background: "rgba(0, 0, 0, 0.7)",
});
},
+ // 文件个数超出
+ handleExceed() {
+ this.$message.error(`上传文件数量不能超过 ${this.limit} 个!`);
+ },
+ // 上传失败
handleUploadError() {
this.$message({
type: "error",
@@ -77,24 +174,37 @@ export default {
});
this.loading.close();
},
- },
- watch: {},
+ // 预览
+ handlePictureCardPreview(file) {
+ this.dialogImageUrl = file.url;
+ this.dialogVisible = true;
+ },
+ // 对象转成指定字符串分隔
+ listToString(list, separator) {
+ let strs = "";
+ separator = separator || ",";
+ for (let i in list) {
+ strs += list[i].url + separator;
+ }
+ return strs != '' ? strs.substr(0, strs.length - 1) : '';
+ }
+ }
};
-
\ No newline at end of file
+// 去掉动画效果
+::v-deep .el-list-enter-active,
+::v-deep .el-list-leave-active {
+ transition: all 0s;
+}
+
+::v-deep .el-list-enter, .el-list-leave-active {
+ opacity: 0;
+ transform: translateY(0);
+}
+
+
diff --git a/ruoyi-ui/src/components/TopNav/index.vue b/ruoyi-ui/src/components/TopNav/index.vue
index d89930a8..c8837f2a 100644
--- a/ruoyi-ui/src/components/TopNav/index.vue
+++ b/ruoyi-ui/src/components/TopNav/index.vue
@@ -73,9 +73,9 @@ export default {
if(router.path === "/") {
router.children[item].path = "/redirect/" + router.children[item].path;
} else {
- if(!this.ishttp(router.children[item].path)) {
+ if(!this.ishttp(router.children[item].path)) {
router.children[item].path = router.path + "/" + router.children[item].path;
- }
+ }
}
router.children[item].parentPath = router.path;
}
From 821f54f1ab984eadf3f7e0a2e79f9a372814f8d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?=
<15040126243@163.com>
Date: Thu, 8 Jul 2021 20:05:37 +0800
Subject: [PATCH 39/62] =?UTF-8?q?update=20=E5=AF=8C=E6=96=87=E6=9C=AC?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E=E5=80=BC=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ruoyi-ui/src/components/Editor/index.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ruoyi-ui/src/components/Editor/index.vue b/ruoyi-ui/src/components/Editor/index.vue
index 8e616794..bb3a9247 100644
--- a/ruoyi-ui/src/components/Editor/index.vue
+++ b/ruoyi-ui/src/components/Editor/index.vue
@@ -166,7 +166,7 @@ export default {
// 获取光标所在位置
let length = quill.getSelection().index;
// 插入图片 res.url为服务器返回的图片地址
- quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
+ quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.data.fileName);
// 调整光标到最后
quill.setSelection(length + 1);
} else {
From 6a8e281b6684c4c39b910de3935eab63d301d88c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?=
<15040126243@163.com>
Date: Thu, 8 Jul 2021 20:06:06 +0800
Subject: [PATCH 40/62] =?UTF-8?q?update=20=E6=9B=B4=E6=96=B0docker?=
=?UTF-8?q?=E8=84=9A=E6=9C=AC=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docker/deploy.sh | 12 ++++++------
docker/docker-compose.yml | 5 +++--
ruoyi-admin/Dockerfile | 5 +++--
3 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/docker/deploy.sh b/docker/deploy.sh
index bbfdaf42..69b529a4 100644
--- a/docker/deploy.sh
+++ b/docker/deploy.sh
@@ -16,9 +16,9 @@ port(){
##放置挂载文件
mount(){
#挂载配置文件
- if test ! -f "/docker/nginx/nginx.conf" ;then
- mkdir -p /docker/nginx
- cp nginx/nginx.conf /docker/nginx/nginx.conf
+ if test ! -f "/docker/nginx/conf/nginx.conf" ;then
+ mkdir -p /docker/nginx/conf
+ cp nginx/nginx.conf /docker/nginx/conf/nginx.conf
fi
}
@@ -64,13 +64,13 @@ case "$1" in
base
;;
"start")
- modules
+ start
;;
"stop")
- stopmodules
+ stop
;;
"stopall")
- stop
+ stopall
;;
"rm")
rm
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index f0f50191..93c18f4d 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -18,8 +18,6 @@ services:
- /docker/mysql/data/:/var/lib/mysql/
# 配置挂载
- /docker/mysql/conf/:/etc/mysql/conf.d/
- # 初始化目录挂载
- - /docker/mysql/init/:/docker-entrypoint-initdb.d/
command:
# 将mysql8.0默认密码策略 修改为 原先 策略 (mysql8.0对其默认策略做了更改 会导致密码无法匹配)
--default-authentication-plugin=mysql_native_password
@@ -81,6 +79,9 @@ services:
image: "ruoyi/ruoyi-admin:2.4.0"
environment:
- TZ=Asia/Shanghai
+ volumes:
+ # 配置文件
+ - /docker/server/logs/:/ruoyi/server/logs/
privileged: true
restart: always
networks:
diff --git a/ruoyi-admin/Dockerfile b/ruoyi-admin/Dockerfile
index a3c4dc14..88f4932b 100644
--- a/ruoyi-admin/Dockerfile
+++ b/ruoyi-admin/Dockerfile
@@ -2,9 +2,10 @@ FROM anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER Lion Li
-RUN mkdir -p /ruoyi/admin
+RUN mkdir -p /ruoyi/server
+RUN mkdir -p /ruoyi/server/logs
-WORKDIR /ruoyi/admin
+WORKDIR /ruoyi/server
EXPOSE 8080
From ae8c0b6c4395618365b9fd48f81251c96de315c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?=
<15040126243@163.com>
Date: Thu, 8 Jul 2021 20:06:19 +0800
Subject: [PATCH 41/62] =?UTF-8?q?update=20=E6=9B=B4=E6=96=B0sql=E6=96=87?=
=?UTF-8?q?=E4=BB=B6=E9=A1=B9=E7=9B=AE=E5=AE=98=E7=BD=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sql/ry_20210210.sql | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sql/ry_20210210.sql b/sql/ry_20210210.sql
index 1d8ec367..59a55f12 100644
--- a/sql/ry_20210210.sql
+++ b/sql/ry_20210210.sql
@@ -159,7 +159,7 @@ create table sys_menu (
insert into sys_menu values('1', '系统管理', '0', '1', 'system', null, 1, 0, 'M', '0', '0', '', 'system', 'admin', sysdate(), '', null, '系统管理目录');
insert into sys_menu values('2', '系统监控', '0', '2', 'monitor', null, 1, 0, 'M', '0', '0', '', 'monitor', 'admin', sysdate(), '', null, '系统监控目录');
insert into sys_menu values('3', '系统工具', '0', '3', 'tool', null, 1, 0, 'M', '0', '0', '', 'tool', 'admin', sysdate(), '', null, '系统工具目录');
-insert into sys_menu values('4', '若依官网', '0', '4', 'http://ruoyi.vip', null , 0, 0, 'M', '0', '0', '', 'guide', 'admin', sysdate(), '', null, '若依官网地址');
+insert into sys_menu values('4', 'PLUS官网', '0', '4', 'https://gitee.com/JavaLionLi/RuoYi-Vue-Plus', null , 0, 0, 'M', '0', '0', '', 'guide', 'admin', sysdate(), '', null, 'RuoYi-Vue-Plus官网地址');
-- 二级菜单
insert into sys_menu values('100', '用户管理', '1', '1', 'user', 'system/user/index', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 'admin', sysdate(), '', null, '用户管理菜单');
insert into sys_menu values('101', '角色管理', '1', '2', 'role', 'system/role/index', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 'admin', sysdate(), '', null, '角色管理菜单');
@@ -685,4 +685,4 @@ create table gen_table_column (
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
primary key (column_id)
-) engine=innodb auto_increment=1 comment = '代码生成业务表字段';
\ No newline at end of file
+) engine=innodb auto_increment=1 comment = '代码生成业务表字段';
From e16936663850f349a766b99e26307acadb508c16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?=
<15040126243@163.com>
Date: Thu, 8 Jul 2021 20:18:27 +0800
Subject: [PATCH 42/62] =?UTF-8?q?update=20=E6=9B=B4=E6=96=B0=E6=96=87?=
=?UTF-8?q?=E6=A1=A3=20PR=20=E8=AF=B4=E6=98=8E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/README.md b/README.md
index 5fc29ab7..788d7023 100644
--- a/README.md
+++ b/README.md
@@ -58,6 +58,12 @@
### 四、加群
以上三点已经能解决大家绝大部分问题了,如果还有问题没能通过这几种方式解决,那么加群,大家一起在群里探讨一下
+## 贡献代码
+
+欢迎各路英雄豪杰 `PR` 代码 请提交到 `dev` 开发分支 统一测试发版
+
+框架定位为 `通用后台管理系统(分布式集群强化)` 原则上不接受业务 `PR`
+
## 修改RuoYi功能
### 依赖改动
From 18705b4f26f8707b91d5506b94ae44a6c051e53f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?=
<15040126243@163.com>
Date: Thu, 8 Jul 2021 20:33:49 +0800
Subject: [PATCH 43/62] =?UTF-8?q?update=20=E6=9B=B4=E6=96=B0=E6=96=87?=
=?UTF-8?q?=E6=A1=A3=20Docker=20=E6=96=87=E6=A1=A3=E8=AF=B4=E6=98=8E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 788d7023..0b98748d 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,12 @@
[![JDK-8+](https://img.shields.io/badge/JDK-8+-green.svg)]()
[![JDK-11](https://img.shields.io/badge/JDK-11-green.svg)]()
-基于 RuoYi-Vue 集成 Mybatis-Plus Lombok Hutool 等便捷开发工具 适配重写相关业务 便于开发 定期与 RuoYi-Vue 同步
+RuoYi-Vue-Plus 是基于 RuoYi-Vue 针对 `分布式集群` 场景升级 定期与 RuoYi-Vue 同步
+
+集成 Lock4j dynamic-datasource 等分布式场景解决方案
+
+集成 Mybatis-Plus Lombok Hutool 等便捷开发工具 适配重写相关业务 便于开发
+
* 前端开发框架 Vue、Element UI
* 后端开发框架 Spring Boot、Redis
* 容器框架 Undertow 基于 Netty 的高性能容器
@@ -27,6 +32,7 @@
* 多数据源框架 dynamic-datasource 支持主从与多种类数据库异构
* Redis客户端 采用 Redisson 性能更强
* 分布式锁 Lock4j 注解锁、工具锁 多种多样
+* 部署方式 Docker 容器编排 一键部署业务集群
## 参考文档
@@ -80,6 +86,7 @@
* 移除 fastjson 统一使用 jackson 序列化
* 集成 dynamic-datasource 多数据源(默认支持MySQL,其他种类需自行适配)
* 集成 Lock4j 实现分布式 注解锁、工具锁 多种多样
+* 增加 Docker 容器编排 打包插件与部署脚本
### 代码改动
From bc5898b8cd8bae23d1059a1b4c1837724ed218b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?=
<15040126243@163.com>
Date: Thu, 8 Jul 2021 20:34:12 +0800
Subject: [PATCH 44/62] =?UTF-8?q?update=20=E6=9B=B4=E6=96=B0=20nginx=20?=
=?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docker/nginx/nginx.conf | 49 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
create mode 100644 docker/nginx/nginx.conf
diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf
new file mode 100644
index 00000000..cd4013bf
--- /dev/null
+++ b/docker/nginx/nginx.conf
@@ -0,0 +1,49 @@
+worker_processes 1;
+
+events {
+ worker_connections 1024;
+}
+
+http {
+ include mime.types;
+ default_type application/octet-stream;
+ sendfile on;
+ keepalive_timeout 65;
+
+ upstream server {
+ server 172.30.0.60:8080;
+ server 172.30.0.61:8080;
+ }
+
+ server {
+ listen 80;
+ server_name localhost;
+
+ location / {
+ root /usr/share/nginx/html;
+ try_files $uri $uri/ /index.html;
+ index index.html index.htm;
+ }
+
+ 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://server/;
+ }
+
+ location /admin/ {
+ 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://server/admin/;
+ }
+
+ error_page 500 502 503 504 /50x.html;
+ location = /50x.html {
+ root html;
+ }
+ }
+}
From dcad0cdf92558caf3920b27f2c6cd5df2d146d23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?=
<15040126243@163.com>
Date: Thu, 8 Jul 2021 20:34:24 +0800
Subject: [PATCH 45/62] =?UTF-8?q?update=20=E6=9B=B4=E6=96=B0=20=E4=B8=9A?=
=?UTF-8?q?=E5=8A=A1=E6=A8=A1=E5=9D=97=20=E9=9B=86=E7=BE=A4=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docker/deploy.sh | 4 ++--
docker/docker-compose.yml | 19 ++++++++++++++++---
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/docker/deploy.sh b/docker/deploy.sh
index 69b529a4..7fc79fdc 100644
--- a/docker/deploy.sh
+++ b/docker/deploy.sh
@@ -29,12 +29,12 @@ base(){
#启动程序模块
start(){
- docker-compose up -d ruoyi-admin
+ docker-compose up -d ruoyi-server1 ruoyi-server2
}
#停止程序模块
stop(){
- docker-compose stop ruoyi-admin
+ docker-compose stop ruoyi-server1 ruoyi-server2
}
#关闭所有模块
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index 93c18f4d..4a720b6d 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -75,19 +75,32 @@ services:
ruoyi_net:
ipv4_address: 172.30.0.48
- ruoyi-admin:
- image: "ruoyi/ruoyi-admin:2.4.0"
+ ruoyi-server1:
+ image: "ruoyi/ruoyi-server:2.4.0"
environment:
- TZ=Asia/Shanghai
volumes:
# 配置文件
- - /docker/server/logs/:/ruoyi/server/logs/
+ - /docker/server1/logs/:/ruoyi/server/logs/
privileged: true
restart: always
networks:
ruoyi_net:
ipv4_address: 172.30.0.60
+ ruoyi-server2:
+ image: "ruoyi/ruoyi-server:2.4.0"
+ environment:
+ - TZ=Asia/Shanghai
+ volumes:
+ # 配置文件
+ - /docker/server2/logs/:/ruoyi/server/logs/
+ privileged: true
+ restart: always
+ networks:
+ ruoyi_net:
+ ipv4_address: 172.30.0.61
+
networks:
ruoyi_net:
driver: bridge
From 4c500eb50cbdc67ad280194f2d70096fe45b8c63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?=
<15040126243@163.com>
Date: Thu, 8 Jul 2021 21:01:57 +0800
Subject: [PATCH 46/62] =?UTF-8?q?update=20=E6=9B=B4=E6=96=B0=20=E9=83=A8?=
=?UTF-8?q?=E7=BD=B2=E6=96=87=E6=A1=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 0b98748d..332ce974 100644
--- a/README.md
+++ b/README.md
@@ -40,6 +40,8 @@ RuoYi-Vue-Plus 是基于 RuoYi-Vue 针对 `分布式集群` 场景升级 定期