From d936ce76b19c9a7cab0beeb509f853284e428b6a Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 4 Nov 2022 16:08:45 +0800 Subject: [PATCH 01/77] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dsheet=E8=B6=85=E5=87=BA?= =?UTF-8?q?=E6=9C=80=E5=A4=A7=E8=A1=8C=E6=95=B0=E5=BC=82=E5=B8=B8=E9=97=AE?= =?UTF-8?q?=E9=A2=98(I5YQ7Z)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java index e6daeced..36b21a9a 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java @@ -562,7 +562,7 @@ public class ExcelUtil int rowNo = (1 + rownum) - startNo; for (int i = startNo; i < endNo; i++) { - rowNo = i > 1 ? rowNo + 1 : rowNo + i; + rowNo = isSubList() ? (i > 1 ? rowNo + 1 : rowNo + i) : i + 1 + rownum - startNo; row = sheet.createRow(rowNo); // 得到导出对象. T vo = (T) list.get(i); From e0a5e704b0ab25390c431fb54158ec102dfb3f67 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 11 Nov 2022 11:36:02 +0800 Subject: [PATCH 02/77] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E7=9A=84=E5=AD=90=E5=88=97=E8=A1=A8=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E4=BC=9A=E5=87=BA=E7=8E=B0[]=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java index 36b21a9a..2d64b229 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java @@ -784,6 +784,10 @@ public class ExcelUtil { cellValue = RegExUtils.replaceFirst(cellValue, FORMULA_REGEX_STR, "\t$0"); } + if (value instanceof Collection && StringUtils.equals("[]", cellValue)) + { + cellValue = StringUtils.EMPTY; + } cell.setCellValue(StringUtils.isNull(cellValue) ? attr.defaultValue() : cellValue + attr.suffix()); } else if (ColumnType.NUMERIC == attr.cellType()) From 7a3892a77ac620a70e03101e0eb7a5744820e104 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 12 Nov 2022 11:47:20 +0800 Subject: [PATCH 03/77] =?UTF-8?q?=E5=BF=BD=E7=95=A5=E4=B8=8D=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E7=9A=84=E5=B1=9E=E6=80=A7=E6=95=B0=E6=8D=AE=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/common/core/web/domain/BaseEntity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/BaseEntity.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/BaseEntity.java index b316f893..cb12d523 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/BaseEntity.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/BaseEntity.java @@ -5,6 +5,7 @@ import java.util.Date; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; /** * Entity基类 @@ -16,6 +17,7 @@ public class BaseEntity implements Serializable private static final long serialVersionUID = 1L; /** 搜索值 */ + @JsonIgnore private String searchValue; /** 创建者 */ @@ -36,6 +38,7 @@ public class BaseEntity implements Serializable private String remark; /** 请求参数 */ + @JsonIgnore private Map params; public String getSearchValue() From 6e5d7a6dab441eaa6d4ebca8cb8fc6fb2919d4e2 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 14 Nov 2022 11:34:59 +0800 Subject: [PATCH 04/77] =?UTF-8?q?=E5=8D=87=E7=BA=A7druid=E5=88=B0=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC1.2.14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../main/java/com/ruoyi/common/core/web/domain/BaseEntity.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2b1b71e3..1ffa0c70 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ 1.27.2 2.3.2 1.4.5 - 1.2.12 + 1.2.14 3.5.2 2.11.0 1.4 diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/BaseEntity.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/BaseEntity.java index cb12d523..1327c9bc 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/BaseEntity.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/BaseEntity.java @@ -6,6 +6,7 @@ import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; /** * Entity基类 @@ -38,7 +39,7 @@ public class BaseEntity implements Serializable private String remark; /** 请求参数 */ - @JsonIgnore + @JsonInclude(JsonInclude.Include.NON_EMPTY) private Map params; public String getSearchValue() From a9938302f07ecdb51e42b830ce46bf7e3ef22b43 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 15 Nov 2022 14:31:04 +0800 Subject: [PATCH 05/77] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B0=83=E5=BA=A6?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=82=B9=E5=87=BB=E5=A4=9A=E6=AC=A1=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=8D=E5=8F=98=E5=8C=96=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/router/index.js | 2 +- ruoyi-ui/src/views/monitor/job/index.vue | 2 +- ruoyi-ui/src/views/monitor/job/log.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index d23fbfa8..983117c1 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -141,7 +141,7 @@ export const dynamicRoutes = [ permissions: ['monitor:job:list'], children: [ { - path: 'index', + path: 'index/:jobId(\\d+)', component: () => import('@/views/monitor/job/log'), name: 'JobLog', meta: { title: '调度日志', activeMenu: '/monitor/job' } diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue index c18b4426..25da4d71 100644 --- a/ruoyi-ui/src/views/monitor/job/index.vue +++ b/ruoyi-ui/src/views/monitor/job/index.vue @@ -454,7 +454,7 @@ export default { /** 任务日志列表查询 */ handleJobLog(row) { const jobId = row.jobId || 0; - this.$router.push({ path: '/monitor/job-log/index', query: { jobId: jobId } }) + this.$router.push('/monitor/job-log/index/' + jobId) }, /** 新增按钮操作 */ handleAdd() { diff --git a/ruoyi-ui/src/views/monitor/job/log.vue b/ruoyi-ui/src/views/monitor/job/log.vue index ab10c041..f62fb360 100644 --- a/ruoyi-ui/src/views/monitor/job/log.vue +++ b/ruoyi-ui/src/views/monitor/job/log.vue @@ -217,7 +217,7 @@ export default { }; }, created() { - const jobId = this.$route.query.jobId; + const jobId = this.$route.params && this.$route.params.jobId; if (jobId !== undefined && jobId != 0) { getJob(jobId).then(response => { this.queryParams.jobName = response.data.jobName; From a211d930924cb0980655b02a902aca260640a557 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 15 Nov 2022 14:31:23 +0800 Subject: [PATCH 06/77] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9B=9E=E6=98=BE?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=AD=97=E5=85=B8=E6=95=B0=E7=BB=84=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E9=97=AE=E9=A2=98(I60UYQ)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/utils/request.js | 41 ++++++++++------------------------- ruoyi-ui/src/utils/ruoyi.js | 11 ++++++---- 2 files changed, 18 insertions(+), 34 deletions(-) diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js index cebdf8e8..fc39f670 100644 --- a/ruoyi-ui/src/utils/request.js +++ b/ruoyi-ui/src/utils/request.js @@ -78,37 +78,24 @@ service.interceptors.response.use(res => { if (code === 401) { if (!isRelogin.show) { isRelogin.show = true; - MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { - confirmButtonText: '重新登录', - cancelButtonText: '取消', - type: 'warning' - } - ).then(() => { - isRelogin.show = false; - store.dispatch('LogOut').then(() => { - location.href = '/index'; - }) + MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => { + isRelogin.show = false; + store.dispatch('LogOut').then(() => { + location.href = '/index'; + }) }).catch(() => { isRelogin.show = false; }); } return Promise.reject('无效的会话,或者会话已过期,请重新登录。') } else if (code === 500) { - Message({ - message: msg, - type: 'error' - }) + Message({ message: msg, type: 'error' }) return Promise.reject(new Error(msg)) } else if (code === 601) { - Message({ - message: msg, - type: 'warning' - }) + Message({ message: msg, type: 'warning' }) return Promise.reject('error') } else if (code !== 200) { - Notification.error({ - title: msg - }) + Notification.error({ title: msg }) return Promise.reject('error') } else { return res.data @@ -119,18 +106,12 @@ service.interceptors.response.use(res => { let { message } = error; if (message == "Network Error") { message = "后端接口连接异常"; - } - else if (message.includes("timeout")) { + } else if (message.includes("timeout")) { message = "系统接口请求超时"; - } - else if (message.includes("Request failed with status code")) { + } else if (message.includes("Request failed with status code")) { message = "系统接口" + message.substr(message.length - 3) + "异常"; } - Message({ - message: message, - type: 'error', - duration: 5 * 1000 - }) + Message({ message: message, type: 'error', duration: 5 * 1000 }) return Promise.reject(error) } ) diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js index 99cd3143..243c4c7b 100644 --- a/ruoyi-ui/src/utils/ruoyi.js +++ b/ruoyi-ui/src/utils/ruoyi.js @@ -1,4 +1,4 @@ - + /** * 通用js方法封装处理 @@ -86,11 +86,14 @@ export function selectDictLabel(datas, value) { return actions.join(''); } -// 回显数据字典(字符串数组) +// 回显数据字典(字符串、数组) export function selectDictLabels(datas, value, separator) { - if (value === undefined) { + if (value === undefined || value.length ===0) { return ""; } + if (Array.isArray(value)) { + value = value.join(","); + } var actions = []; var currentSeparator = undefined === separator ? "," : separator; var temp = value.split(currentSeparator); @@ -233,4 +236,4 @@ export async function blobValidate(data) { } catch (error) { return true; } -} \ No newline at end of file +} From d2bd73b4dca8208807233f849a5cbb5d7d30e3e3 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 17 Nov 2022 14:26:43 +0800 Subject: [PATCH 07/77] =?UTF-8?q?=E5=BC=80=E5=90=AFTopNav=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=AD=90=E8=8F=9C=E5=8D=95=E9=9A=90=E8=97=8F=E4=BE=A7?= =?UTF-8?q?=E8=BE=B9=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/TopNav/index.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ruoyi-ui/src/components/TopNav/index.vue b/ruoyi-ui/src/components/TopNav/index.vue index 0cc24dba..5f0edbef 100644 --- a/ruoyi-ui/src/components/TopNav/index.vue +++ b/ruoyi-ui/src/components/TopNav/index.vue @@ -92,7 +92,9 @@ export default { if (path !== undefined && path.lastIndexOf("/") > 0 && hideList.indexOf(path) === -1) { const tmpPath = path.substring(1, path.length); activePath = "/" + tmpPath.substring(0, tmpPath.indexOf("/")); - this.$store.dispatch('app/toggleSideBarHide', false); + if (!this.$route.meta.link) { + this.$store.dispatch('app/toggleSideBarHide', false); + } } else if(!this.$route.children) { activePath = path; this.$store.dispatch('app/toggleSideBarHide', true); @@ -145,6 +147,8 @@ export default { } if(routes.length > 0) { this.$store.commit("SET_SIDEBAR_ROUTERS", routes); + } else { + this.$store.dispatch('app/toggleSideBarHide', true); } }, ishttp(url) { From 7a112c7317e9f0e55c4ca86b14533c84448ee0d9 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 21 Nov 2022 12:32:09 +0800 Subject: [PATCH 08/77] =?UTF-8?q?=E5=85=BC=E5=AE=B9Excel=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86=E5=86=85=E5=AE=B9=E8=BF=87=E5=A4=9A=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/core/utils/poi/ExcelUtil.java | 65 ++++++++++++++++++- 1 file changed, 63 insertions(+), 2 deletions(-) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java index 2d64b229..05ce1b76 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java @@ -37,6 +37,7 @@ import org.apache.poi.ss.usermodel.FillPatternType; import org.apache.poi.ss.usermodel.Font; import org.apache.poi.ss.usermodel.HorizontalAlignment; import org.apache.poi.ss.usermodel.IndexedColors; +import org.apache.poi.ss.usermodel.Name; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.VerticalAlignment; @@ -855,8 +856,16 @@ public class ExcelUtil } if (StringUtils.isNotEmpty(attr.prompt()) || attr.combo().length > 0) { - // 提示信息或只能选择不能输入的列内容. - setPromptOrValidation(sheet, attr.combo(), attr.prompt(), 1, 100, column, column); + if (attr.combo().length > 15 || StringUtils.join(attr.combo()).length() > 255) + { + // 如果下拉数大于15或字符串长度大于255,则使用一个新sheet存储,避免生成的模板下拉值获取不到 + setXSSFValidationWithHidden(sheet, attr.combo(), attr.prompt(), 1, 100, column, column); + } + else + { + // 提示信息或只能选择不能输入的列内容. + setPromptOrValidation(sheet, attr.combo(), attr.prompt(), 1, 100, column, column); + } } } @@ -955,6 +964,58 @@ public class ExcelUtil sheet.addValidationData(dataValidation); } + /** + * 设置某些列的值只能输入预制的数据,显示下拉框(兼容超出一定数量的下拉框). + * + * @param sheet 要设置的sheet. + * @param textlist 下拉框显示的内容 + * @param promptContent 提示内容 + * @param firstRow 开始行 + * @param endRow 结束行 + * @param firstCol 开始列 + * @param endCol 结束列 + */ + public void setXSSFValidationWithHidden(Sheet sheet, String[] textlist, String promptContent, int firstRow, int endRow, int firstCol, int endCol) + { + String hideSheetName = "combo_" + firstCol + "_" + endCol; + Sheet hideSheet = wb.createSheet(hideSheetName); // 用于存储 下拉菜单数据 + for (int i = 0; i < textlist.length; i++) + { + hideSheet.createRow(i).createCell(0).setCellValue(textlist[i]); + } + // 创建名称,可被其他单元格引用 + Name name = wb.createName(); + name.setNameName(hideSheetName + "_data"); + name.setRefersToFormula(hideSheetName + "!$A$1:$A$" + textlist.length); + DataValidationHelper helper = sheet.getDataValidationHelper(); + // 加载下拉列表内容 + DataValidationConstraint constraint = helper.createFormulaListConstraint(hideSheetName + "_data"); + // 设置数据有效性加载在哪个单元格上,四个参数分别是:起始行、终止行、起始列、终止列 + CellRangeAddressList regions = new CellRangeAddressList(firstRow, endRow, firstCol, endCol); + // 数据有效性对象 + DataValidation dataValidation = helper.createValidation(constraint, regions); + if (StringUtils.isNotEmpty(promptContent)) + { + // 如果设置了提示信息则鼠标放上去提示 + dataValidation.createPromptBox("", promptContent); + dataValidation.setShowPromptBox(true); + } + // 处理Excel兼容性问题 + if (dataValidation instanceof XSSFDataValidation) + { + dataValidation.setSuppressDropDownArrow(true); + dataValidation.setShowErrorBox(true); + } + else + { + dataValidation.setSuppressDropDownArrow(false); + } + + sheet.addValidationData(dataValidation); + // 设置hiddenSheet隐藏 + wb.setSheetHidden(wb.getSheetIndex(hideSheet), true); + } + /** * 解析导出值 0=男,1=女,2=未知 * From bc1c1dbfa7640856d57d6538056d7e98f43d1dbc Mon Sep 17 00:00:00 2001 From: ylwang Date: Mon, 21 Nov 2022 08:58:44 +0000 Subject: [PATCH 09/77] =?UTF-8?q?=E6=AD=A4=E5=A4=84=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=9B=BE=E5=AF=BC=E8=87=B4=20nacos=E4=BF=AE=E6=94=B9xss?= =?UTF-8?q?=E5=BC=80=E5=85=B3=E6=97=B6=EF=BC=8Cspring=E5=AE=B9=E5=99=A8?= =?UTF-8?q?=E6=9C=AA=E9=87=8D=E5=90=AF=EF=BC=8Cfilter=E4=BB=8D=E8=B5=B7?= =?UTF-8?q?=E6=95=88=E3=80=82=E6=95=85=E5=A2=9E=E5=8A=A0=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=88=A4=E6=96=AD=EF=BC=8C=E5=8F=82=E6=95=B0=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E5=90=8E=EF=BC=8Cxss=E5=BC=80=E5=85=B3=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E3=80=82=20=E6=AD=A4=E5=A4=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=9B=BE=E5=AF=BC=E8=87=B4=20nacos=E4=BF=AE=E6=94=B9x?= =?UTF-8?q?ss=E5=BC=80=E5=85=B3=E6=97=B6=EF=BC=8Cspring=E5=AE=B9=E5=99=A8?= =?UTF-8?q?=E6=9C=AA=E9=87=8D=E5=90=AF=EF=BC=8Cfilter=E4=BB=8D=E8=B5=B7?= =?UTF-8?q?=E6=95=88=E3=80=82=E6=95=85=E5=A2=9E=E5=8A=A0=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=88=A4=E6=96=AD=EF=BC=8C=E5=8F=82=E6=95=B0=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E5=90=8E=EF=BC=8Cxss=E5=BC=80=E5=85=B3=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ylwang --- .../src/main/java/com/ruoyi/gateway/filter/XssFilter.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/XssFilter.java b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/XssFilter.java index bc93e3a8..76792ee4 100644 --- a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/XssFilter.java +++ b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/XssFilter.java @@ -42,6 +42,10 @@ public class XssFilter implements GlobalFilter, Ordered public Mono filter(ServerWebExchange exchange, GatewayFilterChain chain) { ServerHttpRequest request = exchange.getRequest(); + // xss开关未开启 或 通过nacos关闭,不过滤 + if(!xss.getEnabled()){ + return chain.filter(exchange); + } // GET DELETE 不过滤 HttpMethod method = request.getMethod(); if (method == null || method == HttpMethod.GET || method == HttpMethod.DELETE) From b1a67a113e03f56345afdd8ef91cfa7c2529ec65 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 21 Nov 2022 19:46:47 +0800 Subject: [PATCH 10/77] =?UTF-8?q?=E6=B6=88=E9=99=A4Vue3=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=8F=B0=E5=87=BA=E7=8E=B0=E7=9A=84=E8=AD=A6=E5=91=8A=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/system/api/domain/SysRole.java | 9 +- .../resources/vm/vue/v3/index-tree.vue.vm | 21 +--- .../src/main/resources/vm/vue/v3/index.vue.vm | 14 +-- .../com/ruoyi/job/config/ScheduleConfig.java | 114 +++++++++--------- .../java/com/ruoyi/system/domain/SysPost.java | 9 +- .../resources/mapper/system/SysPostMapper.xml | 6 +- .../resources/mapper/system/SysRoleMapper.xml | 6 +- 7 files changed, 78 insertions(+), 101 deletions(-) diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysRole.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysRole.java index 04a4d0ef..f224b422 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysRole.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysRole.java @@ -2,6 +2,7 @@ package com.ruoyi.system.api.domain; import java.util.Set; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -32,7 +33,7 @@ public class SysRole extends BaseEntity /** 角色排序 */ @Excel(name = "角色排序") - private String roleSort; + private Integer roleSort; /** 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限) */ @Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限") @@ -117,13 +118,13 @@ public class SysRole extends BaseEntity this.roleKey = roleKey; } - @NotBlank(message = "显示顺序不能为空") - public String getRoleSort() + @NotNull(message = "显示顺序不能为空") + public Integer getRoleSort() { return roleSort; } - public void setRoleSort(String roleSort) + public void setRoleSort(Integer roleSort) { this.roleSort = roleSort; } diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm index 862297c7..1294525e 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm +++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm @@ -136,24 +136,9 @@ #end diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm index f66cc3b8..8fae4493 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm +++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm @@ -148,18 +148,8 @@ #end diff --git a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java index d0026864..fb4086e1 100644 --- a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java +++ b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/config/ScheduleConfig.java @@ -1,57 +1,57 @@ -package com.ruoyi.job.config; - -import java.util.Properties; -import javax.sql.DataSource; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.scheduling.quartz.SchedulerFactoryBean; - -/** - * 定时任务配置(单机部署建议删除此类和qrtz数据库表,默认走内存会最高效) - * - * @author ruoyi - */ -@Configuration -public class ScheduleConfig -{ - @Bean - public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource) - { - SchedulerFactoryBean factory = new SchedulerFactoryBean(); - factory.setDataSource(dataSource); - - // quartz参数 - Properties prop = new Properties(); - prop.put("org.quartz.scheduler.instanceName", "RuoyiScheduler"); - prop.put("org.quartz.scheduler.instanceId", "AUTO"); - // 线程池配置 - prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool"); - prop.put("org.quartz.threadPool.threadCount", "20"); - prop.put("org.quartz.threadPool.threadPriority", "5"); - // JobStore配置 - prop.put("org.quartz.jobStore.class", "org.springframework.scheduling.quartz.LocalDataSourceJobStore"); - // 集群配置 - prop.put("org.quartz.jobStore.isClustered", "true"); - prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000"); - prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "1"); - prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true"); - - // sqlserver 启用 - // prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?"); - prop.put("org.quartz.jobStore.misfireThreshold", "12000"); - prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_"); - factory.setQuartzProperties(prop); - - factory.setSchedulerName("RuoyiScheduler"); - // 延时启动 - factory.setStartupDelay(1); - factory.setApplicationContextSchedulerContextKey("applicationContextKey"); - // 可选,QuartzScheduler - // 启动时更新己存在的Job,这样就不用每次修改targetObject后删除qrtz_job_details表对应记录了 - factory.setOverwriteExistingJobs(true); - // 设置自动启动,默认为true - factory.setAutoStartup(true); - - return factory; - } -} +//package com.ruoyi.job.config; +// +//import java.util.Properties; +//import javax.sql.DataSource; +//import org.springframework.context.annotation.Bean; +//import org.springframework.context.annotation.Configuration; +//import org.springframework.scheduling.quartz.SchedulerFactoryBean; +// +///** +// * 定时任务配置(单机部署建议删除此类和qrtz数据库表,默认走内存会最高效) +// * +// * @author ruoyi +// */ +//@Configuration +//public class ScheduleConfig +//{ +// @Bean +// public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource) +// { +// SchedulerFactoryBean factory = new SchedulerFactoryBean(); +// factory.setDataSource(dataSource); +// +// // quartz参数 +// Properties prop = new Properties(); +// prop.put("org.quartz.scheduler.instanceName", "RuoyiScheduler"); +// prop.put("org.quartz.scheduler.instanceId", "AUTO"); +// // 线程池配置 +// prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool"); +// prop.put("org.quartz.threadPool.threadCount", "20"); +// prop.put("org.quartz.threadPool.threadPriority", "5"); +// // JobStore配置 +// prop.put("org.quartz.jobStore.class", "org.springframework.scheduling.quartz.LocalDataSourceJobStore"); +// // 集群配置 +// prop.put("org.quartz.jobStore.isClustered", "true"); +// prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000"); +// prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "1"); +// prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true"); +// +// // sqlserver 启用 +// // prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?"); +// prop.put("org.quartz.jobStore.misfireThreshold", "12000"); +// prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_"); +// factory.setQuartzProperties(prop); +// +// factory.setSchedulerName("RuoyiScheduler"); +// // 延时启动 +// factory.setStartupDelay(1); +// factory.setApplicationContextSchedulerContextKey("applicationContextKey"); +// // 可选,QuartzScheduler +// // 启动时更新己存在的Job,这样就不用每次修改targetObject后删除qrtz_job_details表对应记录了 +// factory.setOverwriteExistingJobs(true); +// // 设置自动启动,默认为true +// factory.setAutoStartup(true); +// +// return factory; +// } +//} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java index b5a1e9d3..7c03fbde 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java @@ -1,6 +1,7 @@ package com.ruoyi.system.domain; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -31,7 +32,7 @@ public class SysPost extends BaseEntity /** 岗位排序 */ @Excel(name = "岗位排序") - private String postSort; + private Integer postSort; /** 状态(0正常 1停用) */ @Excel(name = "状态", readConverterExp = "0=正常,1=停用") @@ -74,13 +75,13 @@ public class SysPost extends BaseEntity this.postName = postName; } - @NotBlank(message = "显示顺序不能为空") - public String getPostSort() + @NotNull(message = "显示顺序不能为空") + public Integer getPostSort() { return postSort; } - public void setPostSort(String postSort) + public void setPostSort(Integer postSort) { this.postSort = postSort; } diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml index 2425ae05..faefb2f0 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml @@ -77,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" post_code = #{postCode}, post_name = #{postName}, - post_sort = #{postSort}, + post_sort = #{postSort}, status = #{status}, remark = #{remark}, update_by = #{updateBy}, @@ -91,7 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" post_id, post_code, post_name, - post_sort, + post_sort, status, remark, create_by, @@ -100,7 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{postId}, #{postCode}, #{postName}, - #{postSort}, + #{postSort}, #{status}, #{remark}, #{createBy}, diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml index 12e7f78e..ab601e4b 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" role_id, role_name, role_key, - role_sort, + role_sort, data_scope, menu_check_strictly, dept_check_strictly, @@ -110,7 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{roleId}, #{roleName}, #{roleKey}, - #{roleSort}, + #{roleSort}, #{dataScope}, #{menuCheckStrictly}, #{deptCheckStrictly}, @@ -126,7 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" role_name = #{roleName}, role_key = #{roleKey}, - role_sort = #{roleSort}, + role_sort = #{roleSort}, data_scope = #{dataScope}, menu_check_strictly = #{menuCheckStrictly}, dept_check_strictly = #{deptCheckStrictly}, From ee3f03f1f1de4581d7f0e94834018e6bb84f789f Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 22 Nov 2022 09:25:59 +0800 Subject: [PATCH 11/77] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9F=90=E4=BA=9B?= =?UTF-8?q?=E7=89=B9=E6=80=A7=E7=9A=84=E7=8E=AF=E5=A2=83=E7=94=9F=E6=88=90?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=8F=98=E4=B9=B1=E7=A0=81TXT=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/tool/gen/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue index eeb9efe5..b3a68f17 100644 --- a/ruoyi-ui/src/views/tool/gen/index.vue +++ b/ruoyi-ui/src/views/tool/gen/index.vue @@ -267,7 +267,7 @@ export default { this.$modal.msgSuccess("成功生成到自定义路径:" + row.genPath); }); } else { - this.$download.zip("/code/gen/batchGenCode?tables=" + tableNames, "ruoyi"); + this.$download.zip("/code/gen/batchGenCode?tables=" + tableNames, "ruoyi.zip"); } }, /** 同步数据库操作 */ @@ -305,7 +305,7 @@ export default { return result.value || ' '; }, /** 复制代码成功 */ - clipboardSuccess(){ + clipboardSuccess() { this.$modal.msgSuccess("复制成功"); }, // 多选框选中数据 From 04a042c585fd9c4ea1b7d61163d77c5f72a757f9 Mon Sep 17 00:00:00 2001 From: hjk2008 Date: Fri, 25 Nov 2022 09:32:35 +0000 Subject: [PATCH 12/77] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E6=8C=87=E5=AE=9A=20spring-boot-maven-plugin=20=E7=9A=84?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7=E9=BB=98=E8=AE=A4=E5=8E=BB=E6=8B=89?= =?UTF-8?q?=E5=8F=96=E5=9F=BA=E4=BA=8E=20JDK17=20=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E7=9A=84=203.0=20=E7=89=88=E6=9C=AC=E5=AF=BC=E8=87=B4=E6=89=93?= =?UTF-8?q?=E5=8C=85=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hjk2008 --- pom.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pom.xml b/pom.xml index 1ffa0c70..1f290b5c 100644 --- a/pom.xml +++ b/pom.xml @@ -263,6 +263,22 @@ + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + + + + repackage + + + + + + From a8be0ccb35828ec333d5a88ff125db53739ba4ae Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 3 Dec 2022 13:20:48 +0800 Subject: [PATCH 13/77] =?UTF-8?q?=E4=BF=AE=E5=A4=8DLog=E6=B3=A8=E8=A7=A3GE?= =?UTF-8?q?T=E8=AF=B7=E6=B1=82=E8=AE=B0=E5=BD=95=E4=B8=8D=E5=88=B0?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/common/core/utils/ServletUtils.java | 31 +++++++++++++++++++ .../common/core/web/domain/AjaxResult.java | 8 ++--- .../ruoyi/common/log/aspect/LogAspect.java | 6 +++- .../com/ruoyi/gateway/filter/XssFilter.java | 3 +- .../service/impl/SysDeptServiceImpl.java | 6 +--- .../service/impl/SysMenuServiceImpl.java | 6 +--- 6 files changed, 44 insertions(+), 16 deletions(-) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ServletUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ServletUtils.java index da36707b..cda37169 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ServletUtils.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ServletUtils.java @@ -4,8 +4,11 @@ import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.net.URLEncoder; +import java.util.Collections; import java.util.Enumeration; +import java.util.HashMap; import java.util.Map; +import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; @@ -79,6 +82,34 @@ public class ServletUtils return Convert.toBool(getRequest().getParameter(name), defaultValue); } + /** + * 获得所有请求参数 + * + * @param request 请求对象{@link ServletRequest} + * @return Map + */ + public static Map getParams(ServletRequest request) + { + final Map map = request.getParameterMap(); + return Collections.unmodifiableMap(map); + } + + /** + * 获得所有请求参数 + * + * @param request 请求对象{@link ServletRequest} + * @return Map + */ + public static Map getParamMap(ServletRequest request) + { + Map params = new HashMap<>(); + for (Map.Entry entry : getParams(request).entrySet()) + { + params.put(entry.getKey(), StringUtils.join(entry.getValue(), ",")); + } + return params; + } + /** * 获取request */ diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/AjaxResult.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/AjaxResult.java index c1e4b82d..583d35e1 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/AjaxResult.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/AjaxResult.java @@ -128,7 +128,7 @@ public class AjaxResult extends HashMap /** * 返回错误消息 * - * @return + * @return 错误消息 */ public static AjaxResult error() { @@ -139,7 +139,7 @@ public class AjaxResult extends HashMap * 返回错误消息 * * @param msg 返回内容 - * @return 警告消息 + * @return 错误消息 */ public static AjaxResult error(String msg) { @@ -151,7 +151,7 @@ public class AjaxResult extends HashMap * * @param msg 返回内容 * @param data 数据对象 - * @return 警告消息 + * @return 错误消息 */ public static AjaxResult error(String msg, Object data) { @@ -163,7 +163,7 @@ public class AjaxResult extends HashMap * * @param code 状态码 * @param msg 返回内容 - * @return 警告消息 + * @return 错误消息 */ public static AjaxResult error(int code, String msg) { diff --git a/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java b/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java index 45cf106d..f6b3a328 100644 --- a/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java +++ b/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java @@ -102,7 +102,6 @@ public class LogAspect catch (Exception exp) { // 记录本地异常日志 - log.error("==前置通知异常=="); log.error("异常信息:{}", exp.getMessage()); exp.printStackTrace(); } @@ -150,6 +149,11 @@ public class LogAspect String params = argsArrayToString(joinPoint.getArgs()); operLog.setOperParam(StringUtils.substring(params, 0, 2000)); } + else + { + Map paramsMap = ServletUtils.getParamMap(ServletUtils.getRequest()); + operLog.setOperParam(StringUtils.substring(JSON.toJSONString(paramsMap, excludePropertyPreFilter()), 0, 2000)); + } } /** diff --git a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/XssFilter.java b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/XssFilter.java index 76792ee4..66e8d400 100644 --- a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/XssFilter.java +++ b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/XssFilter.java @@ -43,7 +43,8 @@ public class XssFilter implements GlobalFilter, Ordered { ServerHttpRequest request = exchange.getRequest(); // xss开关未开启 或 通过nacos关闭,不过滤 - if(!xss.getEnabled()){ + if (!xss.getEnabled()) + { return chain.filter(exchange); } // GET DELETE 不过滤 diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index 5aca64b2..08eaf72e 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -71,11 +71,7 @@ public class SysDeptServiceImpl implements ISysDeptService public List buildDeptTree(List depts) { List returnList = new ArrayList(); - List tempList = new ArrayList(); - for (SysDept dept : depts) - { - tempList.add(dept.getDeptId()); - } + List tempList = depts.stream().map(SysDept::getDeptId).collect(Collectors.toList()); for (SysDept dept : depts) { // 如果是顶级节点, 遍历该父节点的所有子节点 diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java index c6e80294..1e700037 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java @@ -223,11 +223,7 @@ public class SysMenuServiceImpl implements ISysMenuService public List buildMenuTree(List menus) { List returnList = new ArrayList(); - List tempList = new ArrayList(); - for (SysMenu dept : menus) - { - tempList.add(dept.getMenuId()); - } + List tempList = menus.stream().map(SysMenu::getMenuId).collect(Collectors.toList()); for (Iterator iterator = menus.iterator(); iterator.hasNext();) { SysMenu menu = (SysMenu) iterator.next(); From 3d2f9aa9c6c450ddf46746cceced05bd7710fe30 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 3 Dec 2022 13:21:07 +0800 Subject: [PATCH 14/77] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E8=BF=87=E5=A4=9A=E5=B1=95=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E5=85=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/assets/styles/ruoyi.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruoyi-ui/src/assets/styles/ruoyi.scss b/ruoyi-ui/src/assets/styles/ruoyi.scss index 78fa8bb1..c664395b 100644 --- a/ruoyi-ui/src/assets/styles/ruoyi.scss +++ b/ruoyi-ui/src/assets/styles/ruoyi.scss @@ -60,6 +60,10 @@ color: inherit; } +.el-message-box__status + .el-message-box__message{ + word-break: break-word; +} + .el-dialog:not(.is-fullscreen) { margin-top: 6vh !important; } From af33456ca89a9363f163ce1565285410c88bfe89 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 7 Dec 2022 12:43:12 +0800 Subject: [PATCH 15/77] =?UTF-8?q?=E5=8D=87=E7=BA=A7echarts=E5=88=B0?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E7=89=88=E6=9C=AC5.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/package.json | 2 +- ruoyi-ui/src/components/RightPanel/index.vue | 6 ------ ruoyi-ui/src/views/dashboard/BarChart.vue | 2 +- ruoyi-ui/src/views/dashboard/LineChart.vue | 2 +- ruoyi-ui/src/views/dashboard/PieChart.vue | 2 +- ruoyi-ui/src/views/dashboard/RaddarChart.vue | 2 +- 6 files changed, 5 insertions(+), 11 deletions(-) diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 6cebf701..5820ec07 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -40,7 +40,7 @@ "axios": "0.24.0", "clipboard": "2.0.8", "core-js": "3.25.3", - "echarts": "4.9.0", + "echarts": "5.4.0", "element-ui": "2.15.10", "file-saver": "2.0.5", "fuse.js": "6.4.3", diff --git a/ruoyi-ui/src/components/RightPanel/index.vue b/ruoyi-ui/src/components/RightPanel/index.vue index 42b5a6be..25ce3f81 100644 --- a/ruoyi-ui/src/components/RightPanel/index.vue +++ b/ruoyi-ui/src/components/RightPanel/index.vue @@ -39,7 +39,6 @@ export default { } }, mounted() { - this.insertToBody() this.addEventClick() }, beforeDestroy() { @@ -56,11 +55,6 @@ export default { this.show = false window.removeEventListener('click', this.closeSidebar) } - }, - insertToBody() { - const elx = this.$refs.rightPanel - const body = document.querySelector('body') - body.insertBefore(elx, body.firstChild) } } } diff --git a/ruoyi-ui/src/views/dashboard/BarChart.vue b/ruoyi-ui/src/views/dashboard/BarChart.vue index 6b464e1c..116a4317 100644 --- a/ruoyi-ui/src/views/dashboard/BarChart.vue +++ b/ruoyi-ui/src/views/dashboard/BarChart.vue @@ -3,7 +3,7 @@ From 33a0806cbee39162b49951a337ed01d6666c5d6c Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 18 Mar 2023 10:43:52 +0800 Subject: [PATCH 52/77] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=90=8E=E5=AF=BC=E8=88=AA=E6=A0=8F=E5=81=8F=E7=A7=BB=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/layout/components/AppMain.vue | 9 ------ ruoyi-ui/src/layout/index.vue | 32 ++++++++++++++-------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/ruoyi-ui/src/layout/components/AppMain.vue b/ruoyi-ui/src/layout/components/AppMain.vue index 25d5a25a..55804bbe 100644 --- a/ruoyi-ui/src/layout/components/AppMain.vue +++ b/ruoyi-ui/src/layout/components/AppMain.vue @@ -50,12 +50,3 @@ export default { } } - - diff --git a/ruoyi-ui/src/layout/index.vue b/ruoyi-ui/src/layout/index.vue index 202cfcd6..5e00d642 100644 --- a/ruoyi-ui/src/layout/index.vue +++ b/ruoyi-ui/src/layout/index.vue @@ -1,17 +1,19 @@ @@ -72,6 +74,14 @@ export default { height: 100%; width: 100%; + .el-scrollbar{ + height: 100%; + } + + ::v-deep .el-scrollbar__wrap { + overflow-x: hidden; + } + &.mobile.openSidebar { position: fixed; top: 0; From feff4196413820bac23eff738ba304e86fa2ca14 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 18 Mar 2023 10:44:37 +0800 Subject: [PATCH 53/77] =?UTF-8?q?=E5=85=B3=E9=97=AD=E9=A1=B5=E7=AD=BE?= =?UTF-8?q?=E5=90=8E=E5=AD=98=E5=9C=A8=E5=85=B6=E4=BB=96=E9=A1=B5=E7=AD=BE?= =?UTF-8?q?=E6=97=B6=E4=B8=8D=E5=BA=94=E8=AF=A5=E8=B7=B3=E8=BD=AC=E9=A6=96?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/plugins/tab.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/plugins/tab.js b/ruoyi-ui/src/plugins/tab.js index 5e8b834a..60ceb5fa 100644 --- a/ruoyi-ui/src/plugins/tab.js +++ b/ruoyi-ui/src/plugins/tab.js @@ -32,8 +32,12 @@ export default { // 关闭指定tab页签 closePage(obj) { if (obj === undefined) { - return store.dispatch('tagsView/delView', router.currentRoute).then(({ lastPath }) => { - return router.push(lastPath || '/'); + return store.dispatch('tagsView/delView', router.currentRoute).then(({ visitedViews }) => { + const latestView = visitedViews.slice(-1)[0] + if (latestView) { + return router.push(latestView.fullPath) + } + return router.push('/'); }); } return store.dispatch('tagsView/delView', obj); From f8ad7ea3ce00e35e8bd9bb17258153714f03d711 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 18 Mar 2023 10:45:29 +0800 Subject: [PATCH 54/77] =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E9=9A=90=E8=97=8F=E5=B1=9E=E6=80=A7=E5=88=97=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E5=AD=90=E5=AF=B9=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java index 05ce1b76..ebef67e1 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java @@ -1257,7 +1257,8 @@ public class ExcelUtil Excel[] excels = attrs.value(); for (Excel attr : excels) { - if (attr != null && (attr.type() == Type.ALL || attr.type() == type)) + if (!ArrayUtils.contains(this.excludeFields, field.getName() + "." + attr.targetAttr()) + && (attr != null && (attr.type() == Type.ALL || attr.type() == type))) { field.setAccessible(true); fields.add(new Object[] { field, attr }); From b155059d667b7826972e159c2cd070c4f97445fd Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 18 Mar 2023 10:45:57 +0800 Subject: [PATCH 55/77] =?UTF-8?q?=E5=8D=87=E7=BA=A7fastjson=E5=88=B0?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E7=89=882.0.25?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 90070003..b613ba96 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ 3.5.2 2.11.0 2.3 - 2.0.23 + 2.0.25 0.9.1 8.2.2 4.1.2 From 05ca78e82fb4e074760156359d09aefbf14a375c Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 18 Mar 2023 10:51:46 +0800 Subject: [PATCH 56/77] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=B0=E7=BE=A4?= =?UTF-8?q?=E5=8F=B7=EF=BC=9A101038945?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- ruoyi-ui/src/views/index.vue | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1b151036..67070b0e 100644 --- a/README.md +++ b/README.md @@ -128,4 +128,4 @@ com.ruoyi ## 若依微服务交流群 -QQ群: [![加入QQ群](https://img.shields.io/badge/已满-42799195-blue.svg)](https://jq.qq.com/?_wv=1027&k=yqInfq0S) [![加入QQ群](https://img.shields.io/badge/已满-170157040-blue.svg)](https://jq.qq.com/?_wv=1027&k=Oy1mb3p8) [![加入QQ群](https://img.shields.io/badge/已满-130643120-blue.svg)](https://jq.qq.com/?_wv=1027&k=rvxkJtXK) [![加入QQ群](https://img.shields.io/badge/已满-225920371-blue.svg)](https://jq.qq.com/?_wv=1027&k=0Ck3PvTe) [![加入QQ群](https://img.shields.io/badge/已满-201705537-blue.svg)](https://jq.qq.com/?_wv=1027&k=FnHHP4TT) [![加入QQ群](https://img.shields.io/badge/已满-236543183-blue.svg)](https://jq.qq.com/?_wv=1027&k=qdT1Ojpz) [![加入QQ群](https://img.shields.io/badge/已满-213618602-blue.svg)](https://jq.qq.com/?_wv=1027&k=nw3OiyXs) [![加入QQ群](https://img.shields.io/badge/已满-148794840-blue.svg)](https://jq.qq.com/?_wv=1027&k=kiU5WDls) [![加入QQ群](https://img.shields.io/badge/118752664-blue.svg)](https://jq.qq.com/?_wv=1027&k=MtBy6YfT) 点击按钮入群。 \ No newline at end of file +QQ群: [![加入QQ群](https://img.shields.io/badge/已满-42799195-blue.svg)](https://jq.qq.com/?_wv=1027&k=yqInfq0S) [![加入QQ群](https://img.shields.io/badge/已满-170157040-blue.svg)](https://jq.qq.com/?_wv=1027&k=Oy1mb3p8) [![加入QQ群](https://img.shields.io/badge/已满-130643120-blue.svg)](https://jq.qq.com/?_wv=1027&k=rvxkJtXK) [![加入QQ群](https://img.shields.io/badge/已满-225920371-blue.svg)](https://jq.qq.com/?_wv=1027&k=0Ck3PvTe) [![加入QQ群](https://img.shields.io/badge/已满-201705537-blue.svg)](https://jq.qq.com/?_wv=1027&k=FnHHP4TT) [![加入QQ群](https://img.shields.io/badge/已满-236543183-blue.svg)](https://jq.qq.com/?_wv=1027&k=qdT1Ojpz) [![加入QQ群](https://img.shields.io/badge/已满-213618602-blue.svg)](https://jq.qq.com/?_wv=1027&k=nw3OiyXs) [![加入QQ群](https://img.shields.io/badge/已满-148794840-blue.svg)](https://jq.qq.com/?_wv=1027&k=kiU5WDls) [![加入QQ群](https://img.shields.io/badge/已满-118752664-blue.svg)](https://jq.qq.com/?_wv=1027&k=MtBy6YfT) [![加入QQ群](https://img.shields.io/badge/101038945-blue.svg)](https://jq.qq.com/?_wv=1027&k=FqImHgH2) 点击按钮入群。 \ No newline at end of file diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue index a6f1630c..a5404ba7 100644 --- a/ruoyi-ui/src/views/index.vue +++ b/ruoyi-ui/src/views/index.vue @@ -118,10 +118,12 @@ >

- QQ群:满42799195 满170157040 - 满130643120 满225920371 满201705537 满236543183 - 满213618602 148794840 - 118752664 QQ群:满42799195 + 满170157040 满130643120 满225920371 + 满201705537 满236543183 满213618602 + 满148794840 满118752664 + 101038945

From 8b52b90670649ba3d9bdbcc5e464427ab27fc85d Mon Sep 17 00:00:00 2001 From: Llorando <2978127198@qq.com> Date: Tue, 21 Mar 2023 17:24:33 +0800 Subject: [PATCH 57/77] =?UTF-8?q?=E5=BC=82=E6=AD=A5=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E8=A2=AB=E5=90=9E=EF=BC=8C=E5=AF=BC=E8=87=B4=E6=B2=A1?= =?UTF-8?q?=E8=B7=91=E8=BF=9BRemoteLogFallbackFactory=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/system/api/RemoteLogService.java | 2 +- .../java/com/ruoyi/common/log/service/AsyncLogService.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteLogService.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteLogService.java index b8df7954..3402afad 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteLogService.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteLogService.java @@ -27,7 +27,7 @@ public interface RemoteLogService * @return 结果 */ @PostMapping("/operlog") - public R saveLog(@RequestBody SysOperLog sysOperLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); + public R saveLog(@RequestBody SysOperLog sysOperLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) throws Exception; /** * 保存访问记录 diff --git a/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/service/AsyncLogService.java b/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/service/AsyncLogService.java index 4f5986d1..2112dc4a 100644 --- a/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/service/AsyncLogService.java +++ b/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/service/AsyncLogService.java @@ -22,8 +22,7 @@ public class AsyncLogService * 保存系统日志记录 */ @Async - public void saveSysLog(SysOperLog sysOperLog) - { + public void saveSysLog(SysOperLog sysOperLog) throws Exception { remoteLogService.saveLog(sysOperLog, SecurityConstants.INNER); } } From 0b21d15f26010d4736b431bd359900d3ca23da21 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 29 Mar 2023 10:45:46 +0800 Subject: [PATCH 58/77] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/log/service/AsyncLogService.java | 3 ++- .../common/swagger/config/SwaggerAutoConfiguration.java | 4 ++-- .../common/swagger/config/SwaggerBeanPostProcessor.java | 1 - .../com/ruoyi/common/swagger/config/SwaggerProperties.java | 1 - .../common/swagger/config/SwaggerWebConfiguration.java | 1 - .../com/ruoyi/file/service/FastDfsSysFileServiceImpl.java | 3 +-- .../com/ruoyi/file/service/MinioSysFileServiceImpl.java | 3 +-- .../src/main/java/com/ruoyi/file/utils/FileUploadUtils.java | 6 +++--- 8 files changed, 9 insertions(+), 13 deletions(-) diff --git a/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/service/AsyncLogService.java b/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/service/AsyncLogService.java index 2112dc4a..eb9a13aa 100644 --- a/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/service/AsyncLogService.java +++ b/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/service/AsyncLogService.java @@ -22,7 +22,8 @@ public class AsyncLogService * 保存系统日志记录 */ @Async - public void saveSysLog(SysOperLog sysOperLog) throws Exception { + public void saveSysLog(SysOperLog sysOperLog) throws Exception + { remoteLogService.saveLog(sysOperLog, SecurityConstants.INNER); } } diff --git a/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerAutoConfiguration.java b/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerAutoConfiguration.java index 4badbefb..22dfeeb1 100644 --- a/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerAutoConfiguration.java +++ b/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerAutoConfiguration.java @@ -4,11 +4,11 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.function.Predicate; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; diff --git a/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerBeanPostProcessor.java b/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerBeanPostProcessor.java index 1833f5d6..3837f715 100644 --- a/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerBeanPostProcessor.java +++ b/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerBeanPostProcessor.java @@ -2,7 +2,6 @@ package com.ruoyi.common.swagger.config; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanPostProcessor; -import org.springframework.stereotype.Component; import org.springframework.util.ReflectionUtils; import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping; import springfox.documentation.spring.web.plugins.WebFluxRequestHandlerProvider; diff --git a/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerProperties.java b/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerProperties.java index 68c4275b..d8d5c846 100644 --- a/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerProperties.java +++ b/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerProperties.java @@ -3,7 +3,6 @@ package com.ruoyi.common.swagger.config; import java.util.ArrayList; import java.util.List; import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; @ConfigurationProperties("swagger") public class SwaggerProperties diff --git a/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerWebConfiguration.java b/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerWebConfiguration.java index a367b7e9..28556b5e 100644 --- a/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerWebConfiguration.java +++ b/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerWebConfiguration.java @@ -1,6 +1,5 @@ package com.ruoyi.common.swagger.config; -import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; diff --git a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/service/FastDfsSysFileServiceImpl.java b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/service/FastDfsSysFileServiceImpl.java index 631048cf..9336be59 100644 --- a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/service/FastDfsSysFileServiceImpl.java +++ b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/service/FastDfsSysFileServiceImpl.java @@ -1,5 +1,6 @@ package com.ruoyi.file.service; +import java.io.InputStream; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; @@ -8,8 +9,6 @@ import com.github.tobato.fastdfs.domain.fdfs.StorePath; import com.github.tobato.fastdfs.service.FastFileStorageClient; import com.ruoyi.common.core.utils.file.FileTypeUtils; -import java.io.InputStream; - /** * FastDFS 文件存储 * diff --git a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/service/MinioSysFileServiceImpl.java b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/service/MinioSysFileServiceImpl.java index daf8b429..a10d6b97 100644 --- a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/service/MinioSysFileServiceImpl.java +++ b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/service/MinioSysFileServiceImpl.java @@ -1,5 +1,6 @@ package com.ruoyi.file.service; +import java.io.InputStream; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; @@ -8,8 +9,6 @@ import com.ruoyi.file.utils.FileUploadUtils; import io.minio.MinioClient; import io.minio.PutObjectArgs; -import java.io.InputStream; - /** * Minio 文件存储 * diff --git a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java index c7a24840..0d4c4dff 100644 --- a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java +++ b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java @@ -4,10 +4,9 @@ import java.io.File; import java.io.IOException; import java.nio.file.Paths; import java.util.Objects; - -import com.ruoyi.common.core.exception.file.FileException; import org.apache.commons.io.FilenameUtils; import org.springframework.web.multipart.MultipartFile; +import com.ruoyi.common.core.exception.file.FileException; import com.ruoyi.common.core.exception.file.FileNameLengthLimitExceededException; import com.ruoyi.common.core.exception.file.FileSizeLimitExceededException; import com.ruoyi.common.core.exception.file.InvalidExtensionException; @@ -48,7 +47,8 @@ public class FileUploadUtils { return upload(baseDir, file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION); } - catch (FileException fe){ + catch (FileException fe) + { throw new IOException(fe.getDefaultMessage(), fe); } catch (Exception e) From 56d50d10e944474a092d5acbe53f95bede88ed8c Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 5 Apr 2023 16:04:07 +0800 Subject: [PATCH 59/77] update docker --- docker/copy.sh | 4 ++-- docker/nginx/conf/nginx.conf | 27 ++++++++++++++++----------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/docker/copy.sh b/docker/copy.sh index ec2915b8..318efb26 100644 --- a/docker/copy.sh +++ b/docker/copy.sh @@ -9,8 +9,8 @@ usage() { # copy sql echo "begin copy sql " -cp ../sql/ry_20220814.sql ./mysql/db -cp ../sql/ry_config_20220510.sql ./mysql/db +cp ../sql/ry_20230223.sql ./mysql/db +cp ../sql/ry_config_20220929.sql ./mysql/db # copy html echo "begin copy html " diff --git a/docker/nginx/conf/nginx.conf b/docker/nginx/conf/nginx.conf index 56bf0ca2..eccee523 100644 --- a/docker/nginx/conf/nginx.conf +++ b/docker/nginx/conf/nginx.conf @@ -14,23 +14,28 @@ http { listen 80; server_name localhost; - location / { + location / { root /home/ruoyi/projects/ruoyi-ui; - try_files $uri $uri/ /index.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://ruoyi-gateway:8080/; - } + + 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://ruoyi-gateway:8080/; + } + + # 避免actuator暴露 + if ($request_uri ~ "/actuator") { + return 403; + } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } -}# requirepass 123456 \ No newline at end of file +} \ No newline at end of file From 2ad13c9f7283bde4cef1aae86b0713eb94a2af35 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 5 Apr 2023 16:19:47 +0800 Subject: [PATCH 60/77] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E5=A4=B4=E9=83=A8=E9=A1=B5=E7=AD=BE=E6=BB=9A=E5=8A=A8=E6=9D=A1?= =?UTF-8?q?=E8=A2=AB=E9=9A=90=E8=97=8F=E7=9A=84=E9=97=AE=E9=A2=98(I6ORT1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/layout/index.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruoyi-ui/src/layout/index.vue b/ruoyi-ui/src/layout/index.vue index 5e00d642..c7ac8f3c 100644 --- a/ruoyi-ui/src/layout/index.vue +++ b/ruoyi-ui/src/layout/index.vue @@ -78,6 +78,10 @@ export default { height: 100%; } + ::v-deep .el-scrollbar__bar.is-vertical { + z-index: 10; + } + ::v-deep .el-scrollbar__wrap { overflow-x: hidden; } From 7af254ee516adac90e351d4a4d6d1d6d4a58b9cc Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 5 Apr 2023 18:59:31 +0800 Subject: [PATCH 61/77] delete vue-multiselect style --- ruoyi-ui/src/assets/styles/index.scss | 9 --------- 1 file changed, 9 deletions(-) diff --git a/ruoyi-ui/src/assets/styles/index.scss b/ruoyi-ui/src/assets/styles/index.scss index 9f536ae8..44c304fd 100644 --- a/ruoyi-ui/src/assets/styles/index.scss +++ b/ruoyi-ui/src/assets/styles/index.scss @@ -180,12 +180,3 @@ aside { margin-bottom: 10px; } } - -//refine vue-multiselect plugin -.multiselect { - line-height: 16px; -} - -.multiselect--active { - z-index: 1000 !important; -} From 308d497d74193193669ae2bfca79317a0a8a88bb Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 5 Apr 2023 19:00:27 +0800 Subject: [PATCH 62/77] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=94=9F=E6=88=90?= =?UTF-8?q?=E8=A1=A8=E5=AD=97=E6=AE=B5comment=E8=BF=87=E9=95=BF=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/generator/GenTableColumnMapper.xml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml b/ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml index 9271ea65..7375f5fe 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml +++ b/ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -28,23 +28,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + select column_id, table_id, column_name, column_comment, column_type, java_type, java_field, is_pk, is_increment, is_required, is_insert, is_edit, is_list, is_query, query_type, html_type, dict_type, sort, create_by, create_time, update_by, update_time from gen_table_column - + - + - + insert into gen_table_column ( table_id, @@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" )values( #{tableId}, #{columnName}, - #{columnComment}, + (select SUBSTRING_INDEX(#{columnComment}, ' ', 1)), #{columnType}, #{javaType}, #{javaField}, @@ -88,11 +88,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sysdate() ) - + update gen_table_column - column_comment = #{columnComment}, + column_comment = (select SUBSTRING_INDEX(#{columnComment}, ' ', 1)), java_type = #{javaType}, java_field = #{javaField}, is_insert = #{isInsert}, @@ -111,14 +111,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from gen_table_column where table_id in + delete from gen_table_column where table_id in #{tableId} - delete from gen_table_column where column_id in + delete from gen_table_column where column_id in #{item.columnId} From 23ae0eb43b46d2ec412603fd6d625ab25c7bbbe5 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 5 Apr 2023 19:02:44 +0800 Subject: [PATCH 63/77] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dtab=E6=A0=8F=E2=80=9D?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E5=85=B6=E4=BB=96=E2=80=9C=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/IconSelect/index.vue | 2 +- ruoyi-ui/src/views/system/menu/index.vue | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ruoyi-ui/src/components/IconSelect/index.vue b/ruoyi-ui/src/components/IconSelect/index.vue index a7512b2d..20a5d1a8 100644 --- a/ruoyi-ui/src/components/IconSelect/index.vue +++ b/ruoyi-ui/src/components/IconSelect/index.vue @@ -1,7 +1,7 @@ + @@ -33,20 +36,57 @@ export default { default: null, }, value: [Number, String, Array], + // 当未找到匹配的数据时,显示value + showValue: { + type: Boolean, + default: true, + } + }, + data() { + return { + unmatchArray: [], // 记录未匹配的项 + } }, computed: { values() { - if (this.value !== null && typeof this.value !== 'undefined') { + if (this.value !== null && typeof this.value !== "undefined") { return Array.isArray(this.value) ? this.value : [String(this.value)]; } else { return []; } }, + unmatch() { + this.unmatchArray = []; + if (this.value !== null && typeof this.value !== "undefined") { + // 传入值为非数组 + if (!Array.isArray(this.value)) { + if (this.options.some((v) => v.value == this.value)) return false; + this.unmatchArray.push(this.value); + return true; + } + // 传入值为Array + this.value.forEach((item) => { + if (!this.options.some((v) => v.value == item)) + this.unmatchArray.push(item); + }); + return true; + } + // 没有value不显示 + return false; + }, }, + filters: { + handleArray(array) { + if (array.length === 0) return ""; + return array.reduce((pre, cur) => { + return pre + " " + cur; + }) + } + } }; \ No newline at end of file + From d7b309afd9db79a674c14b027c67aecc46432171 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 23 Apr 2023 16:58:19 +0800 Subject: [PATCH 75/77] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E8=A2=AB=E9=98=BB=E6=AD=A2=E6=97=B6vue-route?= =?UTF-8?q?r=E5=86=85=E9=83=A8=E4=BA=A7=E7=94=9F=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/router/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 983117c1..38b85b9e 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -166,9 +166,15 @@ export const dynamicRoutes = [ // 防止连续点击多次路由报错 let routerPush = Router.prototype.push; +let routerReplace = Router.prototype.replace; +// push Router.prototype.push = function push(location) { return routerPush.call(this, location).catch(err => err) } +// replace +Router.prototype.replace = function push(location) { + return routerReplace.call(this, location).catch(err => err) +} export default new Router({ mode: 'history', // 去掉url中的# From 19fb27502bf20acca8b48a2fb362bc771e372562 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 23 Apr 2023 16:58:43 +0800 Subject: [PATCH 76/77] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90=E8=A1=A8=E5=AD=97=E6=AE=B5=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E4=B8=8D=E5=85=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/generator/GenTableColumnMapper.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml b/ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml index 7375f5fe..23f41748 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml +++ b/ruoyi-modules/ruoyi-gen/src/main/resources/mapper/generator/GenTableColumnMapper.xml @@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" )values( #{tableId}, #{columnName}, - (select SUBSTRING_INDEX(#{columnComment}, ' ', 1)), + #{columnComment}, #{columnType}, #{javaType}, #{javaField}, @@ -92,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update gen_table_column - column_comment = (select SUBSTRING_INDEX(#{columnComment}, ' ', 1)), + column_comment = #{columnComment}, java_type = #{javaType}, java_field = #{javaField}, is_insert = #{isInsert}, From a606973cbe850ae0c983094b37d8e0da34de4505 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 23 Apr 2023 16:59:22 +0800 Subject: [PATCH 77/77] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E7=BF=BB=E9=A1=B5/?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E8=B7=AF=E7=94=B1=E6=BB=9A=E5=8A=A8=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/IconSelect/index.vue | 28 ++++++--------- ruoyi-ui/src/layout/components/AppMain.vue | 23 ++++++++++++ .../layout/components/TagsView/ScrollPane.vue | 2 +- ruoyi-ui/src/layout/index.vue | 36 ++++++------------- 4 files changed, 45 insertions(+), 44 deletions(-) diff --git a/ruoyi-ui/src/components/IconSelect/index.vue b/ruoyi-ui/src/components/IconSelect/index.vue index 9f7a9fac..6087c6c4 100644 --- a/ruoyi-ui/src/components/IconSelect/index.vue +++ b/ruoyi-ui/src/components/IconSelect/index.vue @@ -5,16 +5,14 @@

- -
-
-
- - {{ item }} -
+
+
+
+ + {{ item }}
- +
@@ -63,27 +61,21 @@ export default { } .icon-list { height: 200px; - ::v-deep .el-scrollbar { - height: 100%; - .el-scrollbar__wrap { - overflow-x: hidden; - } - } + overflow: auto; .list-container { display: flex; flex-wrap: wrap; .icon-item-wrapper { width: calc(100% / 3); - height: 30px; - line-height: 30px; - margin-bottom: -5px; + height: 25px; + line-height: 25px; cursor: pointer; display: flex; .icon-item { display: flex; max-width: 100%; height: 100%; - padding: 0 2px; + padding: 0 5px; &:hover { background: #ececec; border-radius: 5px; diff --git a/ruoyi-ui/src/layout/components/AppMain.vue b/ruoyi-ui/src/layout/components/AppMain.vue index 55804bbe..c206a18a 100644 --- a/ruoyi-ui/src/layout/components/AppMain.vue +++ b/ruoyi-ui/src/layout/components/AppMain.vue @@ -50,3 +50,26 @@ export default { } } + + diff --git a/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue b/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue index c110bf12..ae4011c8 100644 --- a/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue +++ b/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue @@ -87,7 +87,7 @@ export default { bottom: 0px; } .el-scrollbar__wrap { - height: 49px; + height: 39px; } } } diff --git a/ruoyi-ui/src/layout/index.vue b/ruoyi-ui/src/layout/index.vue index cc1063c8..68eb6674 100644 --- a/ruoyi-ui/src/layout/index.vue +++ b/ruoyi-ui/src/layout/index.vue @@ -1,19 +1,17 @@ @@ -74,18 +72,6 @@ export default { height: 100%; width: 100%; - .el-scrollbar{ - height: 100%; - } - - ::v-deep .el-scrollbar__bar.is-vertical { - z-index: 10; - } - - ::v-deep .el-scrollbar__wrap { - overflow-x: hidden; - } - &.mobile.openSidebar { position: fixed; top: 0;