From 1262fecd2d06a294be04006abd7c74c826f9462d Mon Sep 17 00:00:00 2001 From: zhaoxiao Date: Wed, 15 Mar 2023 17:22:14 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E3=80=90fix=20bug=E3=80=91vxe-table?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/components/jero/JVxeTable/install.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jero-web/src/components/jero/JVxeTable/install.js b/jero-web/src/components/jero/JVxeTable/install.js index c373104e..36252590 100644 --- a/jero-web/src/components/jero/JVxeTable/install.js +++ b/jero-web/src/components/jero/JVxeTable/install.js @@ -41,7 +41,7 @@ installAllCell(VXETable) // 添加事件拦截器 event.clearActived // 比如点击了某个组件的弹出层面板之后,此时被激活单元格不应该被自动关闭,通过返回 false 可以阻止默认的行为。 -VXETable.interceptor.add('event.clearActived', function (params, event, target) { +VXETable.interceptor.add('event.clearActived', function (params) { // 获取组件增强 const col = params.column.params || {} const interceptor = getEnhancedMixins(col.$type, 'interceptor') @@ -51,7 +51,7 @@ VXETable.interceptor.add('event.clearActived', function (params, event, target) return false } // 此处判断一下event是否存在,防止后续内容报错 - const path = event ? getEventPath(event) : [] + const path = params.$event ? getEventPath(params.$event) : [] for (const p of path) { let className = p.className || '' className = typeof className === 'string' ? className : className.toString() From 0d111ae337066cdca5cef500d204be493bf8d7c0 Mon Sep 17 00:00:00 2001 From: zhaoxiao Date: Wed, 15 Mar 2023 17:22:49 +0800 Subject: [PATCH 02/10] =?UTF-8?q?fix=20bug=20=E4=BB=A3=E7=A0=81=E7=94=9F?= =?UTF-8?q?=E6=88=90=E5=99=A8=E6=97=B6=E9=97=B4=E8=8C=83=E5=9B=B4=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=9A=84=E7=BB=84=E4=BB=B6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vue/${entityName}List.vuei | 39 ++++++++++++++++--- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/jero-boot/jero-boot-module-system/src/main/resources/jero/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue/${entityName}List.vuei b/jero-boot/jero-boot-module-system/src/main/resources/jero/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue/${entityName}List.vuei index e6e92c48..bd8e5f82 100644 --- a/jero-boot/jero-boot-module-system/src/main/resources/jero/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue/${entityName}List.vuei +++ b/jero-boot/jero-boot-module-system/src/main/resources/jero/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue/${entityName}List.vuei @@ -69,9 +69,11 @@ <#if query_field_no gt 1> <#if query_field_no gt 1> <#if po.classType=='date'> - <#if query_field_no gt 1> + <#assign date_flag=true> + <#if query_field_no gt 1> <#elseif po.classType=='datetime'> - <#if query_field_no gt 1> + <#assign date_flag=true> + <#if query_field_no gt 1> <#else> <#if query_field_no gt 1> <#if query_field_no gt 1> @@ -227,6 +229,9 @@ import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' <#if list_need_pca> import Area from '@/components/_util/Area' +<#if date_flag> +import { filterObj } from '@/utils/util' + export default { name: '${entityName}List', @@ -404,12 +409,36 @@ export default { }, <#list columns as po> <#if po.classType=='datetime' || po.classType=='date'> - ${po.fieldName}OnOk () { - this.queryParam.${po.fieldName}_begin = this.queryParam.${po.fieldName}Range[0] - this.queryParam.${po.fieldName}_end = this.queryParam.${po.fieldName}Range[1] + // 范围查询需要处理查询参数 + ${po.fieldName}Change (value, valueString) { + if (valueString && valueString.length > 0) { + this.queryParam.${po.fieldName}_begin = valueString[0] + this.queryParam.${po.fieldName}_end = valueString[1] + } }, + <#if date_flag> + getQueryParams () { + // 获取查询条件 + const sqp = {} + if (this.superQueryParams) { + sqp.superQueryParams = encodeURI(this.superQueryParams) + sqp.superQueryMatchType = this.superQueryMatchType + } + const param = JSON.parse(JSON.stringify(Object.assign(sqp, this.queryParam, this.isorter, this.filters))) + param.field = this.getQueryField() + param.pageNo = this.ipagination.current + param.pageSize = this.ipagination.pageSize + <#list columns as po> + <#if po.classType=='datetime' || po.classType=='date'> + // 范围查询需要吧range的属性去掉 + delete param.${po.fieldName}Range + + + return filterObj(param) + }, + getSuperFieldList () { <#include "/common/utils.ftl"> const fieldList = [] From a5d9c878ed9622e43f755054b1ff6137795e69ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=90=A6=E6=B6=9B?= Date: Wed, 15 Mar 2023 17:40:49 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E3=80=90fix=20bug=E3=80=91=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=94=9F=E6=88=90=E5=99=A8=E6=97=B6=E9=97=B4=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=E6=9F=A5=E8=AF=A2=E7=9A=84=E7=BB=84=E4=BB=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../${entityPackage}/controller/${entityName}Controller.javai | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-module-system/src/main/resources/jero/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/controller/${entityName}Controller.javai b/jero-boot/jero-boot-module-system/src/main/resources/jero/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/controller/${entityName}Controller.javai index 1d14892a..b16fb758 100644 --- a/jero-boot/jero-boot-module-system/src/main/resources/jero/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/controller/${entityName}Controller.javai +++ b/jero-boot/jero-boot-module-system/src/main/resources/jero/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/controller/${entityName}Controller.javai @@ -109,7 +109,7 @@ public class ${entityName}Controller extends JeroController<${entityName}, I${en /** * 通过id删除 * - * @param id + * @param map * @return */ @AutoLog(value = "${tableVo.ftlDescription}-通过id删除") From 0fae0c2079c5a4552b7cb5dbdb98904c2132dae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=90=A6=E6=B6=9B?= Date: Wed, 15 Mar 2023 18:02:55 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E3=80=90fix=20sonar=E3=80=91ReflectHelpe?= =?UTF-8?q?r=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/jero/common/util/ReflectHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/ReflectHelper.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/ReflectHelper.java index 4191ead9..46eeada9 100644 --- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/ReflectHelper.java +++ b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/ReflectHelper.java @@ -16,7 +16,7 @@ import java.util.regex.Pattern; @Slf4j public class ReflectHelper { - private Class cls; + private Class cls; /** * 传过来的对象 From 182c33bab76ba62d353b49855df116880ab22298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=90=A6=E6=B6=9B?= Date: Wed, 15 Mar 2023 18:03:13 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E3=80=90fix=20sonar=E3=80=91HttpUtils?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/jero/config/sign/util/HttpUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/config/sign/util/HttpUtils.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/config/sign/util/HttpUtils.java index 82f06e63..aa6e10e6 100644 --- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/config/sign/util/HttpUtils.java +++ b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/config/sign/util/HttpUtils.java @@ -108,7 +108,7 @@ public class HttpUtils { * @param request * @return */ - public static Map getAllRequestParam(final HttpServletRequest request) throws IOException { + public static Map getAllRequestParam(final HttpServletRequest request) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(request.getInputStream())); String str; From 3481a47200d58d61f0b112f25fa4577c2d17b84c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=90=A6=E6=B6=9B?= Date: Wed, 15 Mar 2023 18:03:28 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E3=80=90fix=20sonar=E3=80=91ImportExcelU?= =?UTF-8?q?til=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/jero/common/util/ImportExcelUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/ImportExcelUtil.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/ImportExcelUtil.java index 94666c91..4ae73551 100644 --- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/ImportExcelUtil.java +++ b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/ImportExcelUtil.java @@ -19,7 +19,7 @@ public class ImportExcelUtil { } - public static Result imporReturnRes(int errorLines, int successLines, List errorMessage){ + public static Result imporReturnRes(int errorLines, int successLines, List errorMessage){ if (errorLines == 0) { return Result.OK("共" + successLines + "行数据全部导入成功!"); } else { From 9c61acc78321a7a48095e0c8472c3188d72d8ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=90=A6=E6=B6=9B?= Date: Wed, 15 Mar 2023 18:03:40 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E3=80=90fix=20sonar=E3=80=91QuartzJobCon?= =?UTF-8?q?troller=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jero/modules/quartz/controller/QuartzJobController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/quartz/controller/QuartzJobController.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/quartz/controller/QuartzJobController.java index 0eda9a77..1a825730 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/quartz/controller/QuartzJobController.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/quartz/controller/QuartzJobController.java @@ -1,5 +1,6 @@ package com.jero.modules.quartz.controller; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -222,7 +223,7 @@ public class QuartzJobController { */ // @RequestMapping(value = "/importExcel", method = RequestMethod.POST) @PostMapping("/importExcel") - public Result importExcel(HttpServletRequest request, HttpServletResponse response) throws IOException { + public Result importExcel(HttpServletRequest request, HttpServletResponse response) throws IOException { MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; Map fileMap = multipartRequest.getFileMap(); // 错误信息 From 41b34fb05af82e01f0d44009ff7b64b769a21af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=90=A6=E6=B6=9B?= Date: Wed, 15 Mar 2023 18:04:00 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E3=80=90fix=20sonar=E3=80=91SysDepartCon?= =?UTF-8?q?troller=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jero/modules/system/controller/SysDepartController.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysDepartController.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysDepartController.java index f7ea7bbe..4e0cdcd8 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysDepartController.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysDepartController.java @@ -22,7 +22,6 @@ import com.jero.modules.system.service.ISysUserDepartService; import com.jero.modules.system.service.ISysUserService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; -import org.apache.poi.ss.formula.functions.T; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.jeecgframework.poi.excel.ExcelImportUtil; @@ -338,7 +337,7 @@ public class SysDepartController { // @RequestMapping(value = "/importExcel", method = RequestMethod.POST) @PostMapping("/importExcel") @CacheEvict(value= {CacheConstant.SYS_DEPARTS_CACHE,CacheConstant.SYS_DEPART_IDS_CACHE}, allEntries=true) - public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; List errorMessageList = new ArrayList<>(); List listSysDeparts = null; From a00fe176f2be19d922401769ed85af51d450e257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=90=A6=E6=B6=9B?= Date: Wed, 15 Mar 2023 18:04:13 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E3=80=90fix=20sonar=E3=80=91SysDictContr?= =?UTF-8?q?oller=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/jero/modules/system/controller/SysDictController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysDictController.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysDictController.java index 3b5ca9b1..35e24773 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysDictController.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysDictController.java @@ -1,6 +1,7 @@ package com.jero.modules.system.controller; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -468,7 +469,7 @@ public class SysDictController { @PostMapping(value = "/importExcel") - public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; Map fileMap = multipartRequest.getFileMap(); for (Map.Entry entity : fileMap.entrySet()) { From 67aee4071ec86300d33037b1706516457c6ee02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=90=A6=E6=B6=9B?= Date: Wed, 15 Mar 2023 18:04:34 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E3=80=90fix=20sonar=E3=80=91SysUserContr?= =?UTF-8?q?oller=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/jero/modules/system/controller/SysUserController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysUserController.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysUserController.java index 0dd740aa..c86db272 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysUserController.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/controller/SysUserController.java @@ -526,7 +526,7 @@ public class SysUserController { @RequiresPermissions("sys:user:import") // @RequestMapping(value = "/importExcel", method = RequestMethod.POST) @PostMapping("/importExcel") - public Result importExcel(HttpServletRequest request, HttpServletResponse response)throws IOException { + public Result importExcel(HttpServletRequest request, HttpServletResponse response)throws IOException { MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; Map fileMap = multipartRequest.getFileMap(); // 错误信息