From c11c45179624f7236301341c03389f785c4fdf3a Mon Sep 17 00:00:00 2001 From: liuwx_gitee <22247537@qq.com> Date: Fri, 16 Jun 2023 15:41:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ant-design-vue-jeecg/public/index.html | 4 +- .../public/pdfjs/web/viewer.css | 4 +- .../src/components/chart/README.md | 6 +- .../src/components/jeecg/AJModal/index.vue | 4 +- .../src/components/jeecg/BJModal/index.vue | 4 +- .../src/components/jeecg/CJModal/index.vue | 4 +- .../src/components/jeecg/JImportModal.vue | 2 +- .../src/components/jeecg/JModal/index.vue | 4 +- .../src/components/jeecg/JSlider.vue | 6 +- .../src/components/jeecg/README.md | 2 +- .../src/components/jeecg/modal/JCronModal.vue | 2 +- .../src/components/page/GlobalLayout.vue | 6 +- .../src/components/page/PageLayout.vue | 2 +- .../src/components/setting/SettingDrawer.vue | 4 +- .../src/components/tools/HeaderNotice.vue | 4 +- .../src/views/km/search/DefaultDocSearch.vue | 6 +- .../src/views/system/UserAnnouncementList.vue | 2 +- .../system/modules/DataLogCompareModal.vue | 2 +- .../src/views/system/modules/UserModal.vue | 2 +- .../base/controller/JeecgController.java | 2 +- .../jeecg/common/util/ImportExcelUtil.java | 4 +- .../org/jeecg/common/util/PasswordUtil.java | 22 +++--- .../jeecg/common/util/YouBianCodeUtil.java | 22 +++--- .../util/encryption/AesEncryptUtil.java | 4 +- .../org/jeecg/common/util/oConvertUtils.java | 68 ++++++++--------- .../org/jeecg/config/shiro/ShiroConfig.java | 6 +- .../java/org/jeecg/common/util/RedisUtil.java | 74 +++++++++---------- .../modules/KM/service/IKmDocService.java | 4 +- .../KM/service/impl/KmDocServiceImpl.java | 4 +- .../modules/cas/util/CASServiceUtil.java | 15 ++-- .../controller/ActuatorRedisController.java | 6 +- .../controller/QuartzJobController.java | 38 +++++----- .../system/controller/CommonController.java | 2 +- .../controller/DuplicateCheckController.java | 4 +- .../system/controller/LoginController.java | 48 ++++++------ .../controller/SysAnnouncementController.java | 2 +- .../system/entity/SysGatewayRoute.java | 6 +- .../mapper/SysAnnouncementSendMapper.java | 3 +- .../modules/system/mapper/SysUserMapper.java | 12 +-- .../system/service/ISysDepartService.java | 18 ++--- .../ISysPermissionDataRuleService.java | 20 ++--- .../service/impl/SysDepartServiceImpl.java | 24 +++--- .../java/org/jeecg/SecurityToolsTest.java | 10 +-- 43 files changed, 237 insertions(+), 251 deletions(-) diff --git a/ant-design-vue-jeecg/public/index.html b/ant-design-vue-jeecg/public/index.html index 8639212..12caf8c 100644 --- a/ant-design-vue-jeecg/public/index.html +++ b/ant-design-vue-jeecg/public/index.html @@ -13,8 +13,8 @@ body, #app { height: 100%; - margin: 0px; - padding: 0px; + margin: 0; + padding: 0; } .chromeframe { margin: 0.2em 0; diff --git a/ant-design-vue-jeecg/public/pdfjs/web/viewer.css b/ant-design-vue-jeecg/public/pdfjs/web/viewer.css index e35bdda..252249b 100644 --- a/ant-design-vue-jeecg/public/pdfjs/web/viewer.css +++ b/ant-design-vue-jeecg/public/pdfjs/web/viewer.css @@ -31,7 +31,7 @@ position: absolute; white-space: pre; cursor: text; - transform-origin: 0% 0%; + transform-origin: 0 0; } .textLayer .highlight { @@ -1132,7 +1132,7 @@ html[dir="rtl"] #outerContainer.sidebarOpen #loadingBar { position: absolute; top: 0; left: 0; - width: 0%; + width: 0; height: 100%; background-color: var(--progressBar-color); overflow: hidden; diff --git a/ant-design-vue-jeecg/src/components/chart/README.md b/ant-design-vue-jeecg/src/components/chart/README.md index d2789c8..950c698 100644 --- a/ant-design-vue-jeecg/src/components/chart/README.md +++ b/ant-design-vue-jeecg/src/components/chart/README.md @@ -102,7 +102,7 @@ import BarMultid from '@/components/chart/BarMultid' ```json [ { - "type": "Jeecg", // 列名 + "type": "Jeecg", "Jan.": 18.9, "Feb.": 28.8, "Mar.": 39.3, @@ -227,7 +227,7 @@ import LineChartMultid from '@/components/chart/LineChartMultid' ```json [ { - "type": "Jan", // 列名 + "type": "Jan", "jeecg": 7, "jeebt": 3.9 }, @@ -264,7 +264,6 @@ import Pie from '@/components/chart/Pie' ```json [ - // 所有的 percent 相加等于 100 { "item": "一月", "percent": 40 }, { "item": "二月", "percent": 21 }, { "item": "三月", "percent": 17 }, @@ -292,7 +291,6 @@ import Radar from '@/components/chart/Radar' ```json [ - // score 最小值为 0,最大值为 100 { "item": "一月", "score": 40 }, { "item": "二月", "score": 20 }, { "item": "三月", "score": 67 }, diff --git a/ant-design-vue-jeecg/src/components/jeecg/AJModal/index.vue b/ant-design-vue-jeecg/src/components/jeecg/AJModal/index.vue index eb80a43..955b53c 100644 --- a/ant-design-vue-jeecg/src/components/jeecg/AJModal/index.vue +++ b/ant-design-vue-jeecg/src/components/jeecg/AJModal/index.vue @@ -264,8 +264,8 @@ &.no-title { .ant-modal-header { - padding: 0px 12px; - border-bottom: 0px !important; + padding: 0 12px; + border-bottom: 0 !important; } } } diff --git a/ant-design-vue-jeecg/src/components/jeecg/BJModal/index.vue b/ant-design-vue-jeecg/src/components/jeecg/BJModal/index.vue index d4a7699..7a6bba1 100644 --- a/ant-design-vue-jeecg/src/components/jeecg/BJModal/index.vue +++ b/ant-design-vue-jeecg/src/components/jeecg/BJModal/index.vue @@ -247,8 +247,8 @@ &.no-title { .ant-modal-header { - padding: 0px 12px; - border-bottom: 0px !important; + padding: 0 12px; + border-bottom: 0 !important; } } } diff --git a/ant-design-vue-jeecg/src/components/jeecg/CJModal/index.vue b/ant-design-vue-jeecg/src/components/jeecg/CJModal/index.vue index d6c7e52..241e8df 100644 --- a/ant-design-vue-jeecg/src/components/jeecg/CJModal/index.vue +++ b/ant-design-vue-jeecg/src/components/jeecg/CJModal/index.vue @@ -246,8 +246,8 @@ &.no-title { .ant-modal-header { - padding: 0px 12px; - border-bottom: 0px !important; + padding: 0 12px; + border-bottom: 0 !important; } } } diff --git a/ant-design-vue-jeecg/src/components/jeecg/JImportModal.vue b/ant-design-vue-jeecg/src/components/jeecg/JImportModal.vue index d231ab1..982c114 100644 --- a/ant-design-vue-jeecg/src/components/jeecg/JImportModal.vue +++ b/ant-design-vue-jeecg/src/components/jeecg/JImportModal.vue @@ -6,7 +6,7 @@ :confirmLoading="uploading" @cancel="handleClose"> -
+
是否开启校验: diff --git a/ant-design-vue-jeecg/src/components/jeecg/JModal/index.vue b/ant-design-vue-jeecg/src/components/jeecg/JModal/index.vue index 2f61800..c52ceb0 100644 --- a/ant-design-vue-jeecg/src/components/jeecg/JModal/index.vue +++ b/ant-design-vue-jeecg/src/components/jeecg/JModal/index.vue @@ -227,8 +227,8 @@ } &.no-title{ .ant-modal-header { - padding: 0px 24px; - border-bottom: 0px !important; + padding: 0 24px; + border-bottom: 0 !important; } } } diff --git a/ant-design-vue-jeecg/src/components/jeecg/JSlider.vue b/ant-design-vue-jeecg/src/components/jeecg/JSlider.vue index 18fda68..eae4137 100644 --- a/ant-design-vue-jeecg/src/components/jeecg/JSlider.vue +++ b/ant-design-vue-jeecg/src/components/jeecg/JSlider.vue @@ -2,7 +2,7 @@
{{confirmWords}}
-
+
@@ -101,11 +101,11 @@ .drag_bg{ background-color: #7ac23c; height: 34px; - width: 0px; + width: 0; } .drag_text{ position: absolute; - top: 0px; + top: 0; width: 100%;text-align: center; -moz-user-select: none; -webkit-user-select: none; diff --git a/ant-design-vue-jeecg/src/components/jeecg/README.md b/ant-design-vue-jeecg/src/components/jeecg/README.md index d8e48d1..7747dc5 100644 --- a/ant-design-vue-jeecg/src/components/jeecg/README.md +++ b/ant-design-vue-jeecg/src/components/jeecg/README.md @@ -172,7 +172,7 @@ this.$refs.superQueryModal.show();
{{ title }} - +
diff --git a/ant-design-vue-jeecg/src/components/jeecg/modal/JCronModal.vue b/ant-design-vue-jeecg/src/components/jeecg/modal/JCronModal.vue index 2727495..3a71a38 100644 --- a/ant-design-vue-jeecg/src/components/jeecg/modal/JCronModal.vue +++ b/ant-design-vue-jeecg/src/components/jeecg/modal/JCronModal.vue @@ -848,7 +848,7 @@ .ant-tabs-tab { padding: 0 24px!important; background-color: #f5f7fa!important; - margin-right: 0px!important; + margin-right: 0!important; border-radius: 0; line-height: 38px; border: 1px solid transparent!important; diff --git a/ant-design-vue-jeecg/src/components/page/GlobalLayout.vue b/ant-design-vue-jeecg/src/components/page/GlobalLayout.vue index d377b30..5658f93 100644 --- a/ant-design-vue-jeecg/src/components/page/GlobalLayout.vue +++ b/ant-design-vue-jeecg/src/components/page/GlobalLayout.vue @@ -74,7 +74,7 @@ - + @@ -555,7 +555,7 @@ // 内容区 .layout-content { - margin: 24px 24px 0px; + margin: 24px 24px 0; height: 64px; padding: 0 12px 0 0; } @@ -663,7 +663,7 @@ .ant-dropdown-menu-item > .anticon:first-child, .ant-dropdown-menu-item > a > .anticon:first-child, - .ant-dropdown-menu-submenu-title > .anticon:first-child + .ant-dropdown-menu-submenu-title > .anticon:first-child, .ant-dropdown-menu-submenu-title > a > .anticon:first-child { min-width: 12px; margin-right: 8px; diff --git a/ant-design-vue-jeecg/src/components/page/PageLayout.vue b/ant-design-vue-jeecg/src/components/page/PageLayout.vue index 191fd8a..43b0e6f 100644 --- a/ant-design-vue-jeecg/src/components/page/PageLayout.vue +++ b/ant-design-vue-jeecg/src/components/page/PageLayout.vue @@ -122,6 +122,6 @@ margin-top: 48px; } .page-header[data-v-6740ec88] { - margin: 0px 24px 0; + margin: 0 24px 0; } \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/components/setting/SettingDrawer.vue b/ant-design-vue-jeecg/src/components/setting/SettingDrawer.vue index 79f5e9e..92045b8 100644 --- a/ant-design-vue-jeecg/src/components/setting/SettingDrawer.vue +++ b/ant-design-vue-jeecg/src/components/setting/SettingDrawer.vue @@ -286,8 +286,8 @@ float: left; cursor: pointer; margin-right: 8px; - padding-left: 0px; - padding-right: 0px; + padding-left: 0; + padding-right: 0; text-align: center; color: #fff; font-weight: 700; diff --git a/ant-design-vue-jeecg/src/components/tools/HeaderNotice.vue b/ant-design-vue-jeecg/src/components/tools/HeaderNotice.vue index 1d15db9..873389c 100644 --- a/ant-design-vue-jeecg/src/components/tools/HeaderNotice.vue +++ b/ant-design-vue-jeecg/src/components/tools/HeaderNotice.vue @@ -32,7 +32,7 @@

{{ record.titile }}

-

{{ record.createTime }} 发布

+

{{ record.createTime }} 发布

一般消息 @@ -50,7 +50,7 @@

{{ record.titile }}

-

{{ record.createTime }} 发布

+

{{ record.createTime }} 发布

一般消息 diff --git a/ant-design-vue-jeecg/src/views/km/search/DefaultDocSearch.vue b/ant-design-vue-jeecg/src/views/km/search/DefaultDocSearch.vue index ffcea43..9de7590 100644 --- a/ant-design-vue-jeecg/src/views/km/search/DefaultDocSearch.vue +++ b/ant-design-vue-jeecg/src/views/km/search/DefaultDocSearch.vue @@ -46,7 +46,7 @@ -
+
@@ -104,7 +104,7 @@
-
+
@@ -139,7 +139,7 @@
- + diff --git a/ant-design-vue-jeecg/src/views/system/UserAnnouncementList.vue b/ant-design-vue-jeecg/src/views/system/UserAnnouncementList.vue index 81c8aa6..179fbd5 100644 --- a/ant-design-vue-jeecg/src/views/system/UserAnnouncementList.vue +++ b/ant-design-vue-jeecg/src/views/system/UserAnnouncementList.vue @@ -184,7 +184,7 @@ margin-bottom: 18px; } .anty-row-operator button{margin: 0 5px} - .ant-btn-danger{background-color: #ffffff}z + .ant-btn-danger{background-color: #ffffff} .ant-modal-cust-warp{height: 100%} .ant-modal-cust-warp .ant-modal-body{height:calc(100% - 110px) !important;overflow-y: auto} diff --git a/ant-design-vue-jeecg/src/views/system/modules/DataLogCompareModal.vue b/ant-design-vue-jeecg/src/views/system/modules/DataLogCompareModal.vue index e02bb02..5a69190 100644 --- a/ant-design-vue-jeecg/src/views/system/modules/DataLogCompareModal.vue +++ b/ant-design-vue-jeecg/src/views/system/modules/DataLogCompareModal.vue @@ -159,5 +159,5 @@ margin-top: 20px; } - @import '../../../assets/less/index.less'; + @import '@/assets/less/index.less'; \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/system/modules/UserModal.vue b/ant-design-vue-jeecg/src/views/system/modules/UserModal.vue index 0f47849..a65df3a 100644 --- a/ant-design-vue-jeecg/src/views/system/modules/UserModal.vue +++ b/ant-design-vue-jeecg/src/views/system/modules/UserModal.vue @@ -13,7 +13,7 @@
{{ title }} - +
diff --git a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/base/controller/JeecgController.java b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/base/controller/JeecgController.java index d52d072..817be91 100644 --- a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/base/controller/JeecgController.java +++ b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/base/controller/JeecgController.java @@ -177,7 +177,7 @@ public class JeecgController> { //1200条 saveBatch消耗时间3687毫秒 循环插入消耗时间5212毫秒 log.info("消耗时间" + (System.currentTimeMillis() - start) + "毫秒"); //update-end-author:taoyan date:20190528 for:批量插入数据 - return Result.ok("文件导入成功!数据行数:" + list.size()); + return Result.OK("文件导入成功!数据行数:" + list.size()); } catch (Exception e) { log.error(e.getMessage(), e); return Result.error("文件导入失败:" + e.getMessage()); diff --git a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/ImportExcelUtil.java b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/ImportExcelUtil.java index dcb72dd..aaada80 100644 --- a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/ImportExcelUtil.java +++ b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/ImportExcelUtil.java @@ -18,7 +18,7 @@ public class ImportExcelUtil { public static Result imporReturnRes(int errorLines,int successLines,List errorMessage) throws IOException { if (errorLines == 0) { - return Result.ok("共" + successLines + "行数据全部导入成功!"); + return Result.OK("共" + successLines + "行数据全部导入成功!"); } else { JSONObject result = new JSONObject(5); int totalCount = successLines + errorLines; @@ -31,7 +31,7 @@ public class ImportExcelUtil { String fileName = fileUrl.substring(lastIndex + 1); result.put("fileUrl", "/sys/common/static/" + fileUrl); result.put("fileName", fileName); - Result res = Result.ok(result); + Result res = Result.OK(result); res.setCode(201); res.setMessage("文件导入成功,但有错误。"); return res; diff --git a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/PasswordUtil.java b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/PasswordUtil.java index 1ecb69b..4ed574a 100644 --- a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/PasswordUtil.java +++ b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/PasswordUtil.java @@ -9,10 +9,10 @@ import javax.crypto.spec.PBEKeySpec; import javax.crypto.spec.PBEParameterSpec; public class PasswordUtil { - /** - * JAVA6支持以下任意一种算法 PBEWITHMD5ANDDES PBEWITHMD5ANDTRIPLEDES - * PBEWITHSHAANDDESEDE PBEWITHSHA1ANDRC2_40 PBKDF2WITHHMACSHA1 - * */ + /* + JAVA6支持以下任意一种算法 PBEWITHMD5ANDDES PBEWITHMD5ANDTRIPLEDES + PBEWITHSHAANDDESEDE PBEWITHSHA1ANDRC2_40 PBKDF2WITHHMACSHA1 + */ /** * 定义使用的算法为:PBEWITHMD5andDES算法 @@ -27,7 +27,7 @@ public class PasswordUtil { /** * 获取加密算法中使用的盐值,解密中使用的盐值必须与加密中使用的相同才能完成操作. 盐长度必须为8字节 - * + * * @return byte[] 盐值 * */ public static byte[] getSalt() throws Exception { @@ -44,7 +44,7 @@ public class PasswordUtil { /** * 根据PBE密码生成一把密钥 - * + * * @param password * 生成密钥时所使用的密码 * @return Key PBE算法密钥 @@ -69,7 +69,7 @@ public class PasswordUtil { /** * 加密明文字符串 - * + * * @param plaintext * 待加密的明文字符串 * @param password @@ -98,7 +98,7 @@ public class PasswordUtil { /** * 解密密文字符串 - * + * * @param ciphertext * 待解密的密文字符串 * @param password @@ -129,7 +129,7 @@ public class PasswordUtil { /** * 将字节数组转换为十六进制字符串 - * + * * @param src * 字节数组 * @return @@ -152,7 +152,7 @@ public class PasswordUtil { /** * 将十六进制字符串转换为字节数组 - * + * * @param hexString * 十六进制字符串 * @return @@ -177,4 +177,4 @@ public class PasswordUtil { } -} \ No newline at end of file +} diff --git a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/YouBianCodeUtil.java b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/YouBianCodeUtil.java index ede4fae..3f7c83a 100644 --- a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/YouBianCodeUtil.java +++ b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/YouBianCodeUtil.java @@ -20,7 +20,7 @@ public class YouBianCodeUtil { /** * 根据前一个code,获取同级下一个code * 例如:当前最大code为D01A04,下一个code为:D01A05 - * + * * @param code * @return */ @@ -67,11 +67,11 @@ public class YouBianCodeUtil { /** * 根据父亲code,获取下级的下一个code - * + * * 例如:父亲CODE:A01 * 当前CODE:A01B03 * 获取的code:A01B04 - * + * * @param parentCode 上级code * @param localCode 同级code * @return @@ -88,11 +88,11 @@ public class YouBianCodeUtil { return parentCode; } - + /** * 将数字前面位数补零 - * + * * @param num * @return */ @@ -102,7 +102,7 @@ public class YouBianCodeUtil { /** * 将数字前面位数补零 - * + * * @param num * @return */ @@ -113,7 +113,7 @@ public class YouBianCodeUtil { /** * 递增获取下个数字 - * + * * @param num * @return */ @@ -124,8 +124,8 @@ public class YouBianCodeUtil { /** * 递增获取下个字母 - * - * @param num + * + * @param zimu * @return */ private static char getNextZiMu(char zimu) { @@ -135,7 +135,7 @@ public class YouBianCodeUtil { zimu++; return zimu; } - + /** * 根据数字位数获取最大值 * @param length @@ -163,7 +163,7 @@ public class YouBianCodeUtil { } return cutcode; } - + } // public static void main(String[] args) { // // org.jeecgframework.core.util.LogUtil.info(getNextZiMu('C')); diff --git a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/encryption/AesEncryptUtil.java b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/encryption/AesEncryptUtil.java index a2c4358..afdbddd 100644 --- a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/encryption/AesEncryptUtil.java +++ b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/encryption/AesEncryptUtil.java @@ -23,7 +23,7 @@ public class AesEncryptUtil { * @return 加密的结果 * @throws Exception */ - public static String encrypt(String data, String key, String iv) throws Exception { + public static String encrypt(String data, String key, String iv) { try { Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");//"算法/模式/补码方式"NoPadding PkcsPadding @@ -60,7 +60,7 @@ public class AesEncryptUtil { * @return 解密的结果 * @throws Exception */ - public static String desEncrypt(String data, String key, String iv) throws Exception { + public static String desEncrypt(String data, String key, String iv) { try { byte[] encrypted1 = Base64.decode(data); diff --git a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/oConvertUtils.java b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/oConvertUtils.java index 6192fc7..b451c18 100644 --- a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/oConvertUtils.java +++ b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/oConvertUtils.java @@ -21,7 +21,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; /** - * + * * @Author 张代浩 * */ @@ -39,7 +39,7 @@ public class oConvertUtils { } return (false); } - + public static boolean isNotEmpty(Object object) { if (object != null && !object.equals("") && !object.equals("null")) { return (true); @@ -163,7 +163,7 @@ public class oConvertUtils { return (defval); } } - + public static Integer getInt(Object object) { if (isEmpty(object)) { return null; @@ -199,15 +199,7 @@ public class oConvertUtils { return (getString(s, "")); } - /** - * 转义成Unicode编码 - * @param s - * @return - */ - /*public static String escapeJava(Object s) { - return StringEscapeUtils.escapeJava(getString(s)); - }*/ - + public static String getString(Object object) { if (isEmpty(object)) { return ""; @@ -263,7 +255,7 @@ public class oConvertUtils { /** * 判断一个类是否为基本数据类型。 - * + * * @param clazz * 要判断的类。 * @return true 表示为基本数据类型。 @@ -326,7 +318,7 @@ public class oConvertUtils { /** * java去除字符串中的空格、回车、换行符、制表符 - * + * * @param str * @return */ @@ -343,7 +335,7 @@ public class oConvertUtils { /** * 判断元素是否在数组内 - * + * * @param substring * @param source * @return @@ -370,8 +362,8 @@ public class oConvertUtils { /** * SET转换MAP - * - * @param str + * + * @param setobj * @return */ public static Map SetToMap(Set setobj) { @@ -387,9 +379,9 @@ public class oConvertUtils { public static boolean isInnerIP(String ipAddress) { boolean isInnerIp = false; long ipNum = getIpNum(ipAddress); - /** - * 私有IP:A类 10.0.0.0-10.255.255.255 B类 172.16.0.0-172.31.255.255 C类 192.168.0.0-192.168.255.255 当然,还有127这个网段是环回地址 - **/ + /* + 私有IP:A类 10.0.0.0-10.255.255.255 B类 172.16.0.0-172.31.255.255 C类 192.168.0.0-192.168.255.255 当然,还有127这个网段是环回地址 + */ long aBegin = getIpNum("10.0.0.0"); long aEnd = getIpNum("10.255.255.255"); long bBegin = getIpNum("172.16.0.0"); @@ -414,12 +406,12 @@ public class oConvertUtils { private static boolean isInner(long userIp, long begin, long end) { return (userIp >= begin) && (userIp <= end); } - + /** * 将下划线大写方式命名的字符串转换为驼峰式。 * 如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。
* 例如:hello_world->helloWorld - * + * * @param name * 转换前的下划线大写方式命名的字符串 * @return 转换后的驼峰式命名的字符串 @@ -456,13 +448,13 @@ public class oConvertUtils { } return result.toString(); } - + /** * 将下划线大写方式命名的字符串转换为驼峰式。 * 如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。
* 例如:hello_world,test_id->helloWorld,testId - * - * @param name + * + * @param names * 转换前的下划线大写方式命名的字符串 * @return 转换后的驼峰式命名的字符串 */ @@ -479,13 +471,13 @@ public class oConvertUtils { String result = sf.toString(); return result.substring(0, result.length() - 1); } - + //update-begin--Author:zhoujf Date:20180503 for:TASK #2500 【代码生成器】代码生成器开发一通用模板生成功能 /** * 将下划线大写方式命名的字符串转换为驼峰式。(首字母写) * 如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。
* 例如:hello_world->HelloWorld - * + * * @param name * 转换前的下划线大写方式命名的字符串 * @return 转换后的驼峰式命名的字符串 @@ -514,7 +506,7 @@ public class oConvertUtils { return result.toString(); } //update-end--Author:zhoujf Date:20180503 for:TASK #2500 【代码生成器】代码生成器开发一通用模板生成功能 - + /** * 将驼峰命名转化成下划线 * @param para @@ -522,18 +514,18 @@ public class oConvertUtils { */ public static String camelToUnderline(String para){ if(para.length()<3){ - return para.toLowerCase(); + return para.toLowerCase(); } StringBuilder sb=new StringBuilder(para); int temp=0;//定位 - //从第三个字符开始 避免命名不规范 + //从第三个字符开始 避免命名不规范 for(int i=2;i> select = new ArrayList<>(); for (Map row : list) { Map resultMap = new HashMap<>(); - Set keySet = row.keySet(); - for (String key : keySet) { - String newKey = key.toLowerCase(); - resultMap.put(newKey, row.get(key)); + Set keySet = row.keySet(); + for (String key : keySet) { + String newKey = key.toLowerCase(); + resultMap.put(newKey, row.get(key)); } select.add(resultMap); } diff --git a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java index 1ea904c..4f79aa1 100644 --- a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java +++ b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java @@ -183,9 +183,9 @@ public class ShiroConfig { public DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator() { DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator = new DefaultAdvisorAutoProxyCreator(); defaultAdvisorAutoProxyCreator.setProxyTargetClass(true); - /** - * 解决重复代理问题 github#994 - * 添加前缀判断 不匹配 任何Advisor + /* + 解决重复代理问题 github#994 + 添加前缀判断 不匹配 任何Advisor */ defaultAdvisorAutoProxyCreator.setUsePrefix(true); defaultAdvisorAutoProxyCreator.setAdvisorBeanNamePrefix("_no_advisor"); diff --git a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-tools/src/main/java/org/jeecg/common/util/RedisUtil.java b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-tools/src/main/java/org/jeecg/common/util/RedisUtil.java index dbe2ef2..a5c7215 100644 --- a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-tools/src/main/java/org/jeecg/common/util/RedisUtil.java +++ b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-tools/src/main/java/org/jeecg/common/util/RedisUtil.java @@ -26,7 +26,7 @@ public class RedisUtil { /** * 指定缓存失效时间 - * + * * @param key 键 * @param time 时间(秒) * @return @@ -45,7 +45,7 @@ public class RedisUtil { /** * 根据key 获取过期时间 - * + * * @param key 键 不能为null * @return 时间(秒) 返回0代表为永久有效 */ @@ -55,7 +55,7 @@ public class RedisUtil { /** * 判断key是否存在 - * + * * @param key 键 * @return true 存在 false不存在 */ @@ -70,7 +70,7 @@ public class RedisUtil { /** * 删除缓存 - * + * * @param key 可以传一个值 或多个 */ @SuppressWarnings("unchecked") @@ -87,7 +87,7 @@ public class RedisUtil { // ============================String============================= /** * 普通缓存获取 - * + * * @param key 键 * @return 值 */ @@ -97,7 +97,7 @@ public class RedisUtil { /** * 普通缓存放入 - * + * * @param key 键 * @param value 值 * @return true成功 false失败 @@ -115,7 +115,7 @@ public class RedisUtil { /** * 普通缓存放入并设置时间 - * + * * @param key 键 * @param value 值 * @param time 时间(秒) time要大于0 如果time小于等于0 将设置无限期 @@ -137,9 +137,9 @@ public class RedisUtil { /** * 递增 - * + * * @param key 键 - * @param by 要增加几(大于0) + * @param delta 要增加几(大于0) * @return */ public long incr(String key, long delta) { @@ -151,9 +151,9 @@ public class RedisUtil { /** * 递减 - * + * * @param key 键 - * @param by 要减少几(小于0) + * @param delta 要减少几(小于0) * @return */ public long decr(String key, long delta) { @@ -166,7 +166,7 @@ public class RedisUtil { // ================================Map================================= /** * HashGet - * + * * @param key 键 不能为null * @param item 项 不能为null * @return 值 @@ -177,7 +177,7 @@ public class RedisUtil { /** * 获取hashKey对应的所有键值 - * + * * @param key 键 * @return 对应的多个键值 */ @@ -187,7 +187,7 @@ public class RedisUtil { /** * HashSet - * + * * @param key 键 * @param map 对应多个键值 * @return true 成功 false 失败 @@ -204,7 +204,7 @@ public class RedisUtil { /** * HashSet 并设置时间 - * + * * @param key 键 * @param map 对应多个键值 * @param time 时间(秒) @@ -225,7 +225,7 @@ public class RedisUtil { /** * 向一张hash表中放入数据,如果不存在将创建 - * + * * @param key 键 * @param item 项 * @param value 值 @@ -243,7 +243,7 @@ public class RedisUtil { /** * 向一张hash表中放入数据,如果不存在将创建 - * + * * @param key 键 * @param item 项 * @param value 值 @@ -265,7 +265,7 @@ public class RedisUtil { /** * 删除hash表中的值 - * + * * @param key 键 不能为null * @param item 项 可以使多个 不能为null */ @@ -275,7 +275,7 @@ public class RedisUtil { /** * 判断hash表中是否有该项的值 - * + * * @param key 键 不能为null * @param item 项 不能为null * @return true 存在 false不存在 @@ -286,7 +286,7 @@ public class RedisUtil { /** * hash递增 如果不存在,就会创建一个 并把新增后的值返回 - * + * * @param key 键 * @param item 项 * @param by 要增加几(大于0) @@ -298,7 +298,7 @@ public class RedisUtil { /** * hash递减 - * + * * @param key 键 * @param item 项 * @param by 要减少记(小于0) @@ -311,7 +311,7 @@ public class RedisUtil { // ============================set============================= /** * 根据key获取Set中的所有值 - * + * * @param key 键 * @return */ @@ -326,7 +326,7 @@ public class RedisUtil { /** * 根据value从一个set中查询,是否存在 - * + * * @param key 键 * @param value 值 * @return true 存在 false不存在 @@ -342,7 +342,7 @@ public class RedisUtil { /** * 将数据放入set缓存 - * + * * @param key 键 * @param values 值 可以是多个 * @return 成功个数 @@ -358,7 +358,7 @@ public class RedisUtil { /** * 将set数据放入缓存 - * + * * @param key 键 * @param time 时间(秒) * @param values 值 可以是多个 @@ -379,7 +379,7 @@ public class RedisUtil { /** * 获取set缓存的长度 - * + * * @param key 键 * @return */ @@ -394,7 +394,7 @@ public class RedisUtil { /** * 移除值为value的 - * + * * @param key 键 * @param values 值 可以是多个 * @return 移除的个数 @@ -412,7 +412,7 @@ public class RedisUtil { /** * 获取list缓存的内容 - * + * * @param key 键 * @param start 开始 * @param end 结束 0 到 -1代表所有值 @@ -429,7 +429,7 @@ public class RedisUtil { /** * 获取list缓存的长度 - * + * * @param key 键 * @return */ @@ -444,7 +444,7 @@ public class RedisUtil { /** * 通过索引 获取list中的值 - * + * * @param key 键 * @param index 索引 index>=0时, 0 表头,1 第二个元素,依次类推;index<0时,-1,表尾,-2倒数第二个元素,依次类推 * @return @@ -460,10 +460,9 @@ public class RedisUtil { /** * 将list放入缓存 - * + * * @param key 键 * @param value 值 - * @param time 时间(秒) * @return */ public boolean lSet(String key, Object value) { @@ -478,7 +477,7 @@ public class RedisUtil { /** * 将list放入缓存 - * + * * @param key 键 * @param value 值 * @param time 时间(秒) @@ -499,10 +498,9 @@ public class RedisUtil { /** * 将list放入缓存 - * + * * @param key 键 * @param value 值 - * @param time 时间(秒) * @return */ public boolean lSet(String key, List value) { @@ -517,7 +515,7 @@ public class RedisUtil { /** * 将list放入缓存 - * + * * @param key 键 * @param value 值 * @param time 时间(秒) @@ -538,7 +536,7 @@ public class RedisUtil { /** * 根据索引修改list中的某条数据 - * + * * @param key 键 * @param index 索引 * @param value 值 @@ -556,7 +554,7 @@ public class RedisUtil { /** * 移除N个值为value - * + * * @param key 键 * @param count 移除多少个 * @param value 值 diff --git a/jeecg-boot/jeecg-boot-module-KM/src/main/java/org/jeecg/modules/KM/service/IKmDocService.java b/jeecg-boot/jeecg-boot-module-KM/src/main/java/org/jeecg/modules/KM/service/IKmDocService.java index c8e65de..0fbe4f4 100644 --- a/jeecg-boot/jeecg-boot-module-KM/src/main/java/org/jeecg/modules/KM/service/IKmDocService.java +++ b/jeecg-boot/jeecg-boot-module-KM/src/main/java/org/jeecg/modules/KM/service/IKmDocService.java @@ -34,9 +34,9 @@ public interface IKmDocService extends IService { KmDoc getDocByFileId(String fileId); - void downloadKmDoc(String docId, HttpServletResponse response, HttpServletRequest req) throws IOException, ParseException; + void downloadKmDoc(String docId, HttpServletResponse response, HttpServletRequest req) throws IOException; - void viewKmDoc( String docId, HttpServletResponse response,HttpServletRequest req) throws IOException; + void viewKmDoc( String docId, HttpServletResponse response,HttpServletRequest req); Result editDraft(KmDocParamVO kmDocParamVO); diff --git a/jeecg-boot/jeecg-boot-module-KM/src/main/java/org/jeecg/modules/KM/service/impl/KmDocServiceImpl.java b/jeecg-boot/jeecg-boot-module-KM/src/main/java/org/jeecg/modules/KM/service/impl/KmDocServiceImpl.java index 4fce467..5f76910 100644 --- a/jeecg-boot/jeecg-boot-module-KM/src/main/java/org/jeecg/modules/KM/service/impl/KmDocServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-KM/src/main/java/org/jeecg/modules/KM/service/impl/KmDocServiceImpl.java @@ -1528,7 +1528,7 @@ public class KmDocServiceImpl extends ServiceImpl implements //下载文件 @SuppressWarnings("ALL") - public void downloadKmDoc(String docId, HttpServletResponse response, HttpServletRequest req) throws IOException, ParseException { + public void downloadKmDoc(String docId, HttpServletResponse response, HttpServletRequest req) throws IOException { KmDoc kmDoc = super.getById(docId); if(kmDoc == null) { response.sendError(HttpStatus.NOT_FOUND.value(),"无效的文档"); @@ -1561,7 +1561,7 @@ public class KmDocServiceImpl extends ServiceImpl implements //预览文件 @SuppressWarnings("ALL") - public void viewKmDoc( String docId, HttpServletResponse response,HttpServletRequest req) throws IOException { + public void viewKmDoc( String docId, HttpServletResponse response,HttpServletRequest req) { try { KmDoc kmDoc = super.getById(docId); if(kmDoc == null) { diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/cas/util/CASServiceUtil.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/cas/util/CASServiceUtil.java index 5db7028..0bd7df8 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/cas/util/CASServiceUtil.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/cas/util/CASServiceUtil.java @@ -17,17 +17,17 @@ import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; public class CASServiceUtil { - + public static void main(String[] args) { String serviceUrl = "https://cas.8f8.com.cn:8443/cas/p3/serviceValidate"; String service = "http://localhost:3003/user/login"; String ticket = "ST-5-1g-9cNES6KXNRwq-GuRET103sm0-DESKTOP-VKLS8B3"; String res = getSTValidate(serviceUrl,ticket, service); - + System.out.println("---------res-----"+res); } - - + + /** * 验证ST */ @@ -45,7 +45,7 @@ public class CASServiceUtil { return ""; } - + /** * 读取 response body 内容为字符串 * @@ -62,12 +62,11 @@ public class CASServiceUtil { } return result; } - - + + /** * 创建模拟客户端(针对 https 客户端禁用 SSL 验证) * - * @param cookieStore 缓存的 Cookies 信息 * @return * @throws Exception */ diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/monitor/controller/ActuatorRedisController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/monitor/controller/ActuatorRedisController.java index c983581..5aced9a 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/monitor/controller/ActuatorRedisController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/monitor/controller/ActuatorRedisController.java @@ -36,7 +36,7 @@ public class ActuatorRedisController { public Result getRedisInfo() throws Exception { List infoList = this.redisService.getRedisInfo(); log.info(infoList.toString()); - return Result.ok(infoList); + return Result.OK(infoList); } @GetMapping("/keysSize") @@ -77,7 +77,7 @@ public class ActuatorRedisController { public Map getMemoryInfo() throws Exception { return redisService.getMemoryInfo(); } - + //update-begin--Author:zhangweijian Date:20190425 for:获取磁盘信息 /** * @功能:获取磁盘信息 @@ -95,7 +95,7 @@ public class ActuatorRedisController { File[] fs = File.listRoots(); log.info("查询磁盘信息:"+fs.length+"个"); List> list = new ArrayList<>(); - + for (int i = 0; i < fs.length; i++) { if(fs[i].getTotalSpace()==0) { continue; diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/controller/QuartzJobController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/controller/QuartzJobController.java index 9f1e626..4008a7a 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/controller/QuartzJobController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/quartz/controller/QuartzJobController.java @@ -52,7 +52,7 @@ public class QuartzJobController { /** * 分页列表查询 - * + * * @param quartzJob * @param pageNo * @param pageSize @@ -65,13 +65,13 @@ public class QuartzJobController { QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(quartzJob, req.getParameterMap()); Page page = new Page(pageNo, pageSize); IPage pageList = quartzJobService.page(page, queryWrapper); - return Result.ok(pageList); + return Result.OK(pageList); } /** * 添加定时任务 - * + * * @param quartzJob * @return */ @@ -79,12 +79,12 @@ public class QuartzJobController { @RequestMapping(value = "/add", method = RequestMethod.POST) public Result add(@RequestBody QuartzJob quartzJob) { quartzJobService.saveAndScheduleJob(quartzJob); - return Result.ok("创建定时任务成功"); + return Result.OK("创建定时任务成功"); } /** * 更新定时任务 - * + * * @param quartzJob * @return */ @@ -97,12 +97,12 @@ public class QuartzJobController { log.error(e.getMessage(),e); return Result.error("更新定时任务失败!"); } - return Result.ok("更新定时任务成功!"); + return Result.OK("更新定时任务成功!"); } /** * 通过id删除 - * + * * @param id * @return */ @@ -114,13 +114,13 @@ public class QuartzJobController { return Result.error("未找到对应实体"); } quartzJobService.deleteAndStopJob(quartzJob); - return Result.ok("删除成功!"); + return Result.OK("删除成功!"); } /** * 批量删除 - * + * * @param ids * @return */ @@ -134,12 +134,12 @@ public class QuartzJobController { QuartzJob job = quartzJobService.getById(id); quartzJobService.deleteAndStopJob(job); } - return Result.ok("删除定时任务成功!"); + return Result.OK("删除定时任务成功!"); } /** * 暂停定时任务 - * + * * @param id * @return */ @@ -152,12 +152,12 @@ public class QuartzJobController { return Result.error("定时任务不存在!"); } quartzJobService.pause(job); - return Result.ok("暂停定时任务成功"); + return Result.OK("暂停定时任务成功"); } /** * 启动定时任务 - * + * * @param id * @return */ @@ -171,24 +171,24 @@ public class QuartzJobController { } quartzJobService.resumeJob(job); //scheduler.resumeJob(JobKey.jobKey(job.getJobClassName().trim())); - return Result.ok("恢复定时任务成功"); + return Result.OK("恢复定时任务成功"); } /** * 通过id查询 - * + * * @param id * @return */ @RequestMapping(value = "/queryById", method = RequestMethod.GET) public Result queryById(@RequestParam(name = "id", required = true) String id) { QuartzJob quartzJob = quartzJobService.getById(id); - return Result.ok(quartzJob); + return Result.OK(quartzJob); } /** * 导出excel - * + * * @param request * @param quartzJob */ @@ -209,7 +209,7 @@ public class QuartzJobController { /** * 通过excel导入数据 - * + * * @param request * @param response * @return @@ -265,6 +265,6 @@ public class QuartzJobController { log.info("定时任务 立即执行失败>>"+e.getMessage()); return Result.error("执行失败!"); } - return Result.ok("执行成功!"); + return Result.OK("执行成功!"); } } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/CommonController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/CommonController.java index db6b6a5..c3dd2dd 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/CommonController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/CommonController.java @@ -90,7 +90,7 @@ public class CommonController { //update-begin-author:lvdandan date:20200928 for:修改JEditor编辑器本地上传 savePath = this.uploadLocal(file,bizPath); //update-begin-author:lvdandan date:20200928 for:修改JEditor编辑器本地上传 - /** 富文本编辑器及markdown本地上传时,采用返回链接方式 + /* 富文本编辑器及markdown本地上传时,采用返回链接方式 //针对jeditor编辑器如何使 lcaol模式,采用 base64格式存储 String jeditor = request.getParameter("jeditor"); if(oConvertUtils.isNotEmpty(jeditor)){ diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/DuplicateCheckController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/DuplicateCheckController.java index db5f8f5..c9de283 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/DuplicateCheckController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/DuplicateCheckController.java @@ -34,7 +34,7 @@ public class DuplicateCheckController { /** * 校验数据是否在系统中是否存在 - * + * * @return */ @RequestMapping(value = "/check", method = RequestMethod.GET) @@ -57,7 +57,7 @@ public class DuplicateCheckController { if (num == null || num == 0) { // 该值可用 - return Result.ok("该值可用!"); + return Result.OK("该值可用!"); } else { // 该值不可用 log.info("该值不可用,系统中已存在!"); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/LoginController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/LoginController.java index 8c051af..e272d01 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/LoginController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/LoginController.java @@ -245,7 +245,7 @@ public class LoginController { return result; } //update-end-author:taoyan date:20190828 for:校验验证码 - + //1. 校验用户是否有效 //update-begin-author:wangshuai date:20200601 for: 登录代码验证用户是否注销bug,if条件永远为false LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); @@ -256,7 +256,7 @@ public class LoginController { if(!result.isSuccess()) { return result; } - + //2. 校验用户名或密码是否正确 String userpassword = PasswordUtil.encrypt(username, password, sysUser.getSalt()); String syspassword = sysUser.getPassword(); @@ -264,7 +264,7 @@ public class LoginController { result.error500("用户名或密码错误"); return result; } - + //用户登录信息 sysUser = sysUserService.getUserByName(sysUser.getUsername()); userInfo(sysUser, result); @@ -277,7 +277,7 @@ public class LoginController { //update-end--Author:wangshuai Date:20200714 for:登录日志没有记录人员 return result; } - + /** * 退出登录 * @param request @@ -306,12 +306,12 @@ public class LoginController { redisUtil.del(String.format("%s::%s", CacheConstant.SYS_USERS_CACHE, sysUser.getUsername())); //调用shiro的logout SecurityUtils.getSubject().logout(); - return Result.ok("退出登录成功!"); + return Result.OK("退出登录成功!"); }else { return Result.error("Token无效!"); } } - + /** * 获取访问量 * @return @@ -342,7 +342,7 @@ public class LoginController { result.success("登录成功"); return result; } - + /** * 获取访问量 * @return @@ -363,8 +363,8 @@ public class LoginController { result.setResult(oConvertUtils.toLowerCasePageList(list)); return result; } - - + + /** * 登陆成功选择用户当前部门 * @param user @@ -389,7 +389,7 @@ public class LoginController { /** * 短信登录接口 - * + * * @param jsonObject * @return */ @@ -438,9 +438,9 @@ public class LoginController { } return result; } - - /** - * smsmode 短信模板方式 0 .登录模板、1.注册模板、2.忘记密码模板 + + /* + smsmode 短信模板方式 0 .登录模板、1.注册模板、2.忘记密码模板 */ if (CommonConstant.SMS_TPL_TYPE_0.equals(smsmode)) { //登录模板 @@ -470,11 +470,11 @@ public class LoginController { } return result; } - + /** * 手机号登录接口 - * + * * @param jsonObject * @return */ @@ -483,14 +483,14 @@ public class LoginController { public Result phoneLogin(@RequestBody JSONObject jsonObject) { Result result = new Result(); String phone = jsonObject.getString("mobile"); - + //校验用户有效性 SysUser sysUser = sysUserService.getUserByPhone(phone); result = sysUserService.checkUserIsEffective(sysUser); if(!result.isSuccess()) { return result; } - + String smscode = jsonObject.getString("captcha"); Object code = redisUtil.get(phone); if (!smscode.equals(code)) { @@ -586,7 +586,7 @@ public class LoginController { } return res; } - + /** * app登录 * @param sysLoginModel @@ -598,14 +598,14 @@ public class LoginController { Result result = new Result(); String username = sysLoginModel.getUsername(); String password = sysLoginModel.getPassword(); - + //1. 校验用户是否有效 SysUser sysUser = sysUserService.getUserByName(username); result = sysUserService.checkUserIsEffective(sysUser); if(!result.isSuccess()) { return result; } - + //2. 校验用户名或密码是否正确 String userpassword = PasswordUtil.encrypt(username, password, sysUser.getSalt()); String syspassword = sysUser.getPassword(); @@ -613,7 +613,7 @@ public class LoginController { result.error500("用户名或密码错误"); return result; } - + String orgCode = sysUser.getOrgCode(); if(oConvertUtils.isEmpty(orgCode)) { //如果当前用户无选择部门 查看部门关联信息 @@ -629,7 +629,7 @@ public class LoginController { JSONObject obj = new JSONObject(); //用户登录信息 obj.put("userInfo", sysUser); - + // 生成token String token = JwtUtil.sign(username, syspassword); // 设置超时时间 @@ -663,7 +663,7 @@ public class LoginController { if(checkCode==null || !checkCode.equals(lowerCaseCaptcha)) { return Result.error("验证码错误"); } - return Result.ok(); + return Result.OK(); } -} \ No newline at end of file +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementController.java index 55ef63f..3da465f 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementController.java @@ -400,7 +400,7 @@ public class SysAnnouncementController { } sysAnnouncementService.save(sysAnnouncementExcel); } - return Result.ok("文件导入成功!数据行数:" + listSysAnnouncements.size()); + return Result.OK("文件导入成功!数据行数:" + listSysAnnouncements.size()); } catch (Exception e) { log.error(e.getMessage(),e); return Result.error("文件导入失败!"); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/entity/SysGatewayRoute.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/entity/SysGatewayRoute.java index db9a6ad..dd7bee6 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/entity/SysGatewayRoute.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/entity/SysGatewayRoute.java @@ -97,15 +97,15 @@ public class SysGatewayRoute implements Serializable { @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "创建日期") private Date createTime; - /* *//**更新人*//* + /* *//*更新人*//* @ApiModelProperty(value = "更新人") private String updateBy; - *//**更新日期*//* + *//*更新日期*//* @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "更新日期") private Date updateTime; - *//**所属部门*//* + *//*所属部门*//* @ApiModelProperty(value = "所属部门") private String sysOrgCode;*/ } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysAnnouncementSendMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysAnnouncementSendMapper.java index 56b25c6..938fc3a 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysAnnouncementSendMapper.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysAnnouncementSendMapper.java @@ -22,8 +22,7 @@ public interface SysAnnouncementSendMapper extends BaseMapper getMyAnnouncementSendList(Page page,@Param("announcementSendModel") AnnouncementSendModel announcementSendModel); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java index bdaca9b..409737d 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java @@ -58,22 +58,22 @@ public interface SysUserMapper extends BaseMapper { * @return */ IPage getUserByRoleId(Page page, @Param("roleId") String roleId, @Param("username") String username); - + /** * 根据用户名设置部门ID * @param username - * @param departId + * @param orgCode */ void updateUserDepart(@Param("username") String username,@Param("orgCode") String orgCode); - + /** * 根据手机号查询用户信息 * @param phone * @return */ public SysUser getUserByPhone(@Param("phone") String phone); - - + + /** * 根据邮箱查询用户信息 * @param email @@ -132,7 +132,7 @@ public interface SysUserMapper extends BaseMapper { /** 更新空字符串为null【此写法有sql注入风险,禁止随便用】 */ int updateNullByEmptyString(@Param("fieldName") String fieldName); - + /** * 根据部门Ids,查询部门下用户信息 * @param departIds diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysDepartService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysDepartService.java index 273ed82..143f69e 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysDepartService.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysDepartService.java @@ -11,7 +11,7 @@ import java.util.List; *

* 部门表 服务实现类 *

- * + * * @Author:Steve * @Since: 2019-01-22 */ @@ -47,28 +47,28 @@ public interface ISysDepartService extends IService{ * @return */ Boolean updateDepartDataById(SysDepart sysDepart,String username); - - /** - * 删除depart数据 - * @param id + + /* + 删除depart数据 + @param id * @return */ /* boolean removeDepartDataById(String id); */ - + /** * 根据关键字搜索相关的部门数据 * @param keyWord * @return */ List searhBy(String keyWord,String myDeptSearch,String departIds); - + /** * 根据部门id删除并删除其可能存在的子级部门 * @param id * @return */ boolean delete(String id); - + /** * 查询SysDepart集合 * @param userId @@ -86,7 +86,7 @@ public interface ISysDepartService extends IService{ /** * 根据部门id批量删除并删除其可能存在的子级部门 - * @param id + * @param ids * @return */ void deleteBatchWithChildren(List ids); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysPermissionDataRuleService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysPermissionDataRuleService.java index 1b32ec5..f92dc09 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysPermissionDataRuleService.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysPermissionDataRuleService.java @@ -18,38 +18,38 @@ public interface ISysPermissionDataRuleService extends IService getPermRuleListByPermId(String permissionId); /** * 根据页面传递的参数查询菜单权限数据 - * + * * @return */ List queryPermissionRule(SysPermissionDataRule permRule); - - + + /** * 根据菜单ID和用户名查找数据权限配置信息 - * @param permission + * @param permissionId * @param username * @return */ List queryPermissionDataRules(String username,String permissionId); - + /** * 新增菜单权限配置 修改菜单rule_flag * @param sysPermissionDataRule */ public void savePermissionDataRule(SysPermissionDataRule sysPermissionDataRule); - + /** * 删除菜单权限配置 判断菜单还有无权限 * @param dataRuleId */ public void deletePermissionDataRule(String dataRuleId); - - + + } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.java index 505930c..166e5c4 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.java @@ -30,7 +30,7 @@ import java.util.*; *

* 部门表 服务实现类 *

- * + * * @Author Steve * @Since 2019-01-22 */ @@ -130,14 +130,14 @@ public class SysDepartServiceImpl extends ServiceImpl query = new LambdaQueryWrapper(); LambdaQueryWrapper query1 = new LambdaQueryWrapper(); @@ -195,16 +195,16 @@ public class SysDepartServiceImpl extends ServiceImpl>>>>"+id); boolean * flag = this.removeById(id); return flag; } @@ -226,7 +226,7 @@ public class SysDepartServiceImpl extends ServiceImpl ids) { @@ -342,13 +342,13 @@ public class SysDepartServiceImpl extends ServiceImpl idList) { + private void checkChildrenExists(String id, List idList) { LambdaQueryWrapper query = new LambdaQueryWrapper(); query.eq(SysDepart::getParentId,id); List departList = this.list(query); diff --git a/jeecg-boot/jeecg-boot-module-system/src/test/java/org/jeecg/SecurityToolsTest.java b/jeecg-boot/jeecg-boot-module-system/src/test/java/org/jeecg/SecurityToolsTest.java index 172df05..dfb74d2 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/test/java/org/jeecg/SecurityToolsTest.java +++ b/jeecg-boot/jeecg-boot-module-system/src/test/java/org/jeecg/SecurityToolsTest.java @@ -11,12 +11,12 @@ public class SecurityToolsTest { MyKeyPair mkeyPair = SecurityTools.generateKeyPair(); JSONObject msg = new JSONObject(); - msg.put("name", "党政辉"); - msg.put("age", 50); + msg.set("name", "党政辉"); + msg.set("age", 50); JSONObject identity = new JSONObject(); - identity.put("type", "01"); - identity.put("no", "210882165896524512"); - msg.put("identity", identity); + identity.set("type", "01"); + identity.set("no", "210882165896524512"); + msg.set("identity", identity); // 签名加密部分 SecuritySignReq signReq = new SecuritySignReq();