From 046763131916901e644b373ec3e02f00ad0d7970 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 24 Feb 2025 16:24:36 +0800 Subject: [PATCH 01/17] update ry_config.sql --- docker/copy.sh | 2 +- ...ig_20240902.sql => ry_config_20250224.sql} | 67 ++++++++++--------- 2 files changed, 36 insertions(+), 33 deletions(-) rename sql/{ry_config_20240902.sql => ry_config_20250224.sql} (90%) diff --git a/docker/copy.sh b/docker/copy.sh index 5d8959133..e2ba1d24d 100644 --- a/docker/copy.sh +++ b/docker/copy.sh @@ -10,7 +10,7 @@ usage() { # copy sql echo "begin copy sql " cp ../sql/ry_20240629.sql ./mysql/db -cp ../sql/ry_config_20240902.sql ./mysql/db +cp ../sql/ry_config_20250224.sql ./mysql/db # copy html echo "begin copy html " diff --git a/sql/ry_config_20240902.sql b/sql/ry_config_20250224.sql similarity index 90% rename from sql/ry_config_20240902.sql rename to sql/ry_config_20250224.sql index 759ec8215..842c6e53a 100644 --- a/sql/ry_config_20240902.sql +++ b/sql/ry_config_20250224.sql @@ -13,21 +13,21 @@ USE `ry-config`; CREATE TABLE `config_info` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', `data_id` varchar(255) NOT NULL COMMENT 'data_id', - `group_id` varchar(255) DEFAULT NULL, + `group_id` varchar(128) DEFAULT NULL COMMENT 'group_id', `content` longtext NOT NULL COMMENT 'content', `md5` varchar(32) DEFAULT NULL COMMENT 'md5', `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', `src_user` text COMMENT 'source user', `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip', - `app_name` varchar(128) DEFAULT NULL, + `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name', `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段', - `c_desc` varchar(256) DEFAULT NULL, - `c_use` varchar(64) DEFAULT NULL, - `effect` varchar(64) DEFAULT NULL, - `type` varchar(64) DEFAULT NULL, - `c_schema` text, - `encrypted_data_key` text COMMENT '秘钥', + `c_desc` varchar(256) DEFAULT NULL COMMENT 'configuration description', + `c_use` varchar(64) DEFAULT NULL COMMENT 'configuration usage', + `effect` varchar(64) DEFAULT NULL COMMENT '配置生效的描述', + `type` varchar(64) DEFAULT NULL COMMENT '配置的类型', + `c_schema` text COMMENT '配置的模式', + `encrypted_data_key` varchar(1024) NOT NULL DEFAULT '' COMMENT '密钥', PRIMARY KEY (`id`), UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info'; @@ -102,7 +102,7 @@ CREATE TABLE `config_info_beta` ( `src_user` text COMMENT 'source user', `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip', `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段', - `encrypted_data_key` text COMMENT '秘钥', + `encrypted_data_key` varchar(1024) NOT NULL DEFAULT '' COMMENT '密钥', PRIMARY KEY (`id`), UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_beta'; @@ -137,7 +137,7 @@ CREATE TABLE `config_tags_relation` ( `data_id` varchar(255) NOT NULL COMMENT 'data_id', `group_id` varchar(128) NOT NULL COMMENT 'group_id', `tenant_id` varchar(128) DEFAULT '' COMMENT 'tenant_id', - `nid` bigint(20) NOT NULL AUTO_INCREMENT, + `nid` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'nid, 自增长标识', PRIMARY KEY (`nid`), UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`), KEY `idx_tenant_id` (`tenant_id`) @@ -165,20 +165,23 @@ CREATE TABLE `group_capacity` ( /* 表名称 = his_config_info */ /******************************************/ CREATE TABLE `his_config_info` ( - `id` bigint(64) unsigned NOT NULL, - `nid` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `data_id` varchar(255) NOT NULL, - `group_id` varchar(128) NOT NULL, + `id` bigint(20) unsigned NOT NULL COMMENT 'id', + `nid` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'nid, 自增标识', + `data_id` varchar(255) NOT NULL COMMENT 'data_id', + `group_id` varchar(128) NOT NULL COMMENT 'group_id', `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name', - `content` longtext NOT NULL, - `md5` varchar(32) DEFAULT NULL, - `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, - `src_user` text, - `src_ip` varchar(50) DEFAULT NULL, - `op_type` char(10) DEFAULT NULL, + `content` longtext NOT NULL COMMENT 'content', + `md5` varchar(32) DEFAULT NULL COMMENT 'md5', + `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', + `src_user` text COMMENT 'source user', + `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip', + `op_type` char(10) DEFAULT NULL COMMENT 'operation type', `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段', - `encrypted_data_key` text COMMENT '秘钥', + `encrypted_data_key` varchar(1024) NOT NULL DEFAULT '' COMMENT '密钥', + `publish_type` varchar(50) DEFAULT 'formal' COMMENT 'publish type gray or formal', + `gray_name` varchar(50) DEFAULT NULL COMMENT 'gray name', + `ext_info` longtext DEFAULT NULL COMMENT 'ext info', PRIMARY KEY (`nid`), KEY `idx_gmt_create` (`gmt_create`), KEY `idx_gmt_modified` (`gmt_modified`), @@ -221,22 +224,22 @@ CREATE TABLE `tenant_info` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='tenant_info'; CREATE TABLE `users` ( - `username` varchar(50) NOT NULL PRIMARY KEY, - `password` varchar(500) NOT NULL, - `enabled` boolean NOT NULL + `username` varchar(50) NOT NULL PRIMARY KEY COMMENT 'username', + `password` varchar(500) NOT NULL COMMENT 'password', + `enabled` boolean NOT NULL COMMENT 'enabled' ); CREATE TABLE `roles` ( - `username` varchar(50) NOT NULL, - `role` varchar(50) NOT NULL, - UNIQUE INDEX `idx_user_role` (`username` ASC, `role` ASC) USING BTREE + `username` varchar(50) NOT NULL COMMENT 'username', + `role` varchar(50) NOT NULL COMMENT 'role', + UNIQUE INDEX `idx_user_role` (`username` ASC, `role` ASC) USING BTREE ); CREATE TABLE `permissions` ( - `role` varchar(50) NOT NULL, - `resource` varchar(255) NOT NULL, - `action` varchar(8) NOT NULL, - UNIQUE INDEX `uk_role_permission` (`role`,`resource`,`action`) USING BTREE + `role` varchar(50) NOT NULL COMMENT 'role', + `resource` varchar(128) NOT NULL COMMENT 'resource', + `action` varchar(8) NOT NULL COMMENT 'action', + UNIQUE INDEX `uk_role_permission` (`role`,`resource`,`action`) USING BTREE ); INSERT INTO users (username, password, enabled) VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', TRUE); From 3dcee7057dee0a67204dbf528cd4211a925b6142 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 5 Mar 2025 18:01:33 +0800 Subject: [PATCH 02/17] =?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 --- .../com/ruoyi/common/core/text/Convert.java | 6 ++- .../common/core/web/page/TableDataInfo.java | 2 +- .../common/security/service/TokenService.java | 12 ++--- .../gen/service/GenTableServiceImpl.java | 22 ++++----- .../src/main/resources/vm/java/domain.java.vm | 2 +- .../main/resources/vm/vue/index-tree.vue.vm | 10 ++-- .../src/main/resources/vm/vue/index.vue.vm | 12 ++--- .../resources/vm/vue/v3/index-tree.vue.vm | 10 ++-- .../src/main/resources/vm/vue/v3/index.vue.vm | 12 ++--- .../service/impl/SysMenuServiceImpl.java | 2 +- .../impl/SysPermissionServiceImpl.java | 2 +- .../resources/mapper/system/SysUserMapper.xml | 1 - ruoyi-ui/src/assets/styles/index.scss | 4 -- ruoyi-ui/src/assets/styles/ruoyi.scss | 15 ++---- ruoyi-ui/src/components/Pagination/index.vue | 1 - ruoyi-ui/src/layout/components/Navbar.vue | 4 +- ruoyi-ui/src/store/modules/permission.js | 27 +++-------- ruoyi-ui/src/utils/ruoyi.js | 46 ++++++++----------- ruoyi-ui/src/views/index.vue | 8 ---- .../src/views/system/logininfor/index.vue | 2 +- ruoyi-ui/src/views/system/operlog/index.vue | 2 +- 21 files changed, 79 insertions(+), 123 deletions(-) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/text/Convert.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/text/Convert.java index 7d8894ca8..9ccdcf4e9 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/text/Convert.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/text/Convert.java @@ -540,9 +540,9 @@ public class Convert /** * 转换为boolean
- * String支持的值为:true、false、yes、ok、no,1,0 如果给定的值为空,或者转换失败,返回默认值
+ * String支持的值为:true、false、yes、ok、no、1、0、是、否, 如果给定的值为空,或者转换失败,返回默认值
* 转换失败不会报错 - * + * * @param value 被转换的值 * @param defaultValue 转换错误时的默认值 * @return 结果 @@ -569,10 +569,12 @@ public class Convert case "yes": case "ok": case "1": + case "是": return true; case "false": case "no": case "0": + case "否": return false; default: return defaultValue; diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/page/TableDataInfo.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/page/TableDataInfo.java index 41dc0fe70..7fe3ac0a8 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/page/TableDataInfo.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/page/TableDataInfo.java @@ -37,7 +37,7 @@ public class TableDataInfo implements Serializable * @param list 列表数据 * @param total 总记录数 */ - public TableDataInfo(List list, int total) + public TableDataInfo(List list, long total) { this.rows = list; this.total = total; diff --git a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/service/TokenService.java b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/service/TokenService.java index 29717928b..0a63b851e 100644 --- a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/service/TokenService.java +++ b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/service/TokenService.java @@ -36,11 +36,11 @@ public class TokenService protected static final long MILLIS_MINUTE = 60 * MILLIS_SECOND; - private final static long expireTime = CacheConstants.EXPIRATION; + private final static long TOKEN_EXPIRE_TIME = CacheConstants.EXPIRATION; private final static String ACCESS_TOKEN = CacheConstants.LOGIN_TOKEN_KEY; - private final static Long MILLIS_MINUTE_TEN = CacheConstants.REFRESH_TIME * MILLIS_MINUTE; + private final static Long TOKEN_REFRESH_THRESHOLD_MINUTES = CacheConstants.REFRESH_TIME * MILLIS_MINUTE; /** * 创建令牌 @@ -65,7 +65,7 @@ public class TokenService // 接口返回信息 Map rspMap = new HashMap(); rspMap.put("access_token", JwtUtils.createToken(claimsMap)); - rspMap.put("expires_in", expireTime); + rspMap.put("expires_in", TOKEN_EXPIRE_TIME); return rspMap; } @@ -147,7 +147,7 @@ public class TokenService { long expireTime = loginUser.getExpireTime(); long currentTime = System.currentTimeMillis(); - if (expireTime - currentTime <= MILLIS_MINUTE_TEN) + if (expireTime - currentTime <= TOKEN_REFRESH_THRESHOLD_MINUTES) { refreshToken(loginUser); } @@ -161,10 +161,10 @@ public class TokenService public void refreshToken(LoginUser loginUser) { loginUser.setLoginTime(System.currentTimeMillis()); - loginUser.setExpireTime(loginUser.getLoginTime() + expireTime * MILLIS_MINUTE); + loginUser.setExpireTime(loginUser.getLoginTime() + TOKEN_EXPIRE_TIME * MILLIS_MINUTE); // 根据uuid将loginUser缓存 String userKey = getTokenKey(loginUser.getToken()); - redisService.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES); + redisService.setCacheObject(userKey, loginUser, TOKEN_EXPIRE_TIME, TimeUnit.MINUTES); } private String getTokenKey(String token) diff --git a/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/service/GenTableServiceImpl.java b/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/service/GenTableServiceImpl.java index 24194ccd5..6031be171 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/service/GenTableServiceImpl.java +++ b/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/service/GenTableServiceImpl.java @@ -129,9 +129,9 @@ public class GenTableServiceImpl implements IGenTableService int row = genTableMapper.updateGenTable(genTable); if (row > 0) { - for (GenTableColumn cenTableColumn : genTable.getColumns()) + for (GenTableColumn genTableColumn : genTable.getColumns()) { - genTableColumnMapper.updateGenTableColumn(cenTableColumn); + genTableColumnMapper.updateGenTableColumn(genTableColumn); } } } @@ -414,16 +414,16 @@ public class GenTableServiceImpl implements IGenTableService { throw new ServiceException("树名称字段不能为空"); } - else if (GenConstants.TPL_SUB.equals(genTable.getTplCategory())) + } + else if (GenConstants.TPL_SUB.equals(genTable.getTplCategory())) + { + if (StringUtils.isEmpty(genTable.getSubTableName())) { - if (StringUtils.isEmpty(genTable.getSubTableName())) - { - throw new ServiceException("关联子表的表名不能为空"); - } - else if (StringUtils.isEmpty(genTable.getSubTableFkName())) - { - throw new ServiceException("子表关联的外键名不能为空"); - } + throw new ServiceException("关联子表的表名不能为空"); + } + else if (StringUtils.isEmpty(genTable.getSubTableFkName())) + { + throw new ServiceException("子表关联的外键名不能为空"); } } } diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/domain.java.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/domain.java.vm index 3e6be024e..af7e7ab87 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/domain.java.vm +++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/domain.java.vm @@ -71,9 +71,9 @@ public class ${ClassName} extends ${Entity} { return $column.javaField; } + #end #end - #if($table.sub) public List<${subClassName}> get${subClassName}List() { diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm index b7fdb62d7..b0233bc9a 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm +++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm @@ -75,7 +75,7 @@ icon="el-icon-plus" size="mini" @click="handleAdd" - v-hasPermi="['${moduleName}:${businessName}:add']" + v-hasPermi="['${permissionPrefix}:add']" >新增 @@ -144,21 +144,21 @@ type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" - v-hasPermi="['${moduleName}:${businessName}:edit']" + v-hasPermi="['${permissionPrefix}:edit']" >修改 新增 删除 @@ -453,7 +453,7 @@ export default { this.reset(); this.getTreeselect(); if (row != null) { - this.form.${treeParentCode} = row.${treeCode}; + this.form.${treeParentCode} = row.${treeParentCode}; } get${BusinessName}(row.${pkColumn.javaField}).then(response => { this.form = response.data; diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm index 70ff30dd5..ce2b47a91 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm +++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm @@ -75,7 +75,7 @@ icon="el-icon-plus" size="mini" @click="handleAdd" - v-hasPermi="['${moduleName}:${businessName}:add']" + v-hasPermi="['${permissionPrefix}:add']" >新增 @@ -86,7 +86,7 @@ size="mini" :disabled="single" @click="handleUpdate" - v-hasPermi="['${moduleName}:${businessName}:edit']" + v-hasPermi="['${permissionPrefix}:edit']" >修改 @@ -97,7 +97,7 @@ size="mini" :disabled="multiple" @click="handleDelete" - v-hasPermi="['${moduleName}:${businessName}:remove']" + v-hasPermi="['${permissionPrefix}:remove']" >删除 @@ -107,7 +107,7 @@ icon="el-icon-download" size="mini" @click="handleExport" - v-hasPermi="['${moduleName}:${businessName}:export']" + v-hasPermi="['${permissionPrefix}:export']" >导出 @@ -158,14 +158,14 @@ type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" - v-hasPermi="['${moduleName}:${businessName}:edit']" + v-hasPermi="['${permissionPrefix}:edit']" >修改 删除 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 7bbd2fc51..cd7c5b513 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 @@ -73,7 +73,7 @@ plain icon="Plus" @click="handleAdd" - v-hasPermi="['${moduleName}:${businessName}:add']" + v-hasPermi="['${permissionPrefix}:add']" >新增 @@ -136,9 +136,9 @@ #end @@ -420,7 +420,7 @@ async function handleUpdate(row) { reset(); await getTreeselect(); if (row != null) { - form.value.${treeParentCode} = row.${treeCode}; + form.value.${treeParentCode} = row.${treeParentCode}; } get${BusinessName}(row.${pkColumn.javaField}).then(response => { form.value = response.data; 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 8b25665aa..ca79b3563 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 @@ -73,7 +73,7 @@ plain icon="Plus" @click="handleAdd" - v-hasPermi="['${moduleName}:${businessName}:add']" + v-hasPermi="['${permissionPrefix}:add']" >新增 @@ -83,7 +83,7 @@ icon="Edit" :disabled="single" @click="handleUpdate" - v-hasPermi="['${moduleName}:${businessName}:edit']" + v-hasPermi="['${permissionPrefix}:edit']" >修改 @@ -93,7 +93,7 @@ icon="Delete" :disabled="multiple" @click="handleDelete" - v-hasPermi="['${moduleName}:${businessName}:remove']" + v-hasPermi="['${permissionPrefix}:remove']" >删除 @@ -102,7 +102,7 @@ plain icon="Download" @click="handleExport" - v-hasPermi="['${moduleName}:${businessName}:export']" + v-hasPermi="['${permissionPrefix}:export']" >导出 @@ -148,8 +148,8 @@ #end 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 0e721b6b7..299804f4a 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 @@ -365,7 +365,7 @@ public class SysMenuServiceImpl implements ISysMenuService /** * 获取路由名称,如没有配置路由名称则取路由地址 * - * @param routerName 路由名称 + * @param name 路由名称 * @param path 路由地址 * @return 路由名称(驼峰格式) */ diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPermissionServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPermissionServiceImpl.java index dc51aa8f6..5a0c0b257 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPermissionServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPermissionServiceImpl.java @@ -73,7 +73,7 @@ public class SysPermissionServiceImpl implements ISysPermissionService // 多角色设置permissions属性,以便数据权限匹配权限 for (SysRole role : roles) { - if (StringUtils.equals(role.getStatus(), UserConstants.ROLE_NORMAL)) + if (StringUtils.equals(role.getStatus(), UserConstants.ROLE_NORMAL) && !role.isAdmin()) { Set rolePerms = menuService.selectMenuPermsByRoleId(role.getRoleId()); role.setPermissions(rolePerms); diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index 5814cd357..f11b7793f 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -146,7 +146,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" insert into sys_user( user_id, dept_id, - user_name, nick_name, email, avatar, diff --git a/ruoyi-ui/src/assets/styles/index.scss b/ruoyi-ui/src/assets/styles/index.scss index 44c304fd3..e3e5e0b39 100644 --- a/ruoyi-ui/src/assets/styles/index.scss +++ b/ruoyi-ui/src/assets/styles/index.scss @@ -129,10 +129,6 @@ aside { position: relative; } -.pagination-container { - margin-top: 30px; -} - .text-center { text-align: center } diff --git a/ruoyi-ui/src/assets/styles/ruoyi.scss b/ruoyi-ui/src/assets/styles/ruoyi.scss index 359e8c242..5562a276c 100644 --- a/ruoyi-ui/src/assets/styles/ruoyi.scss +++ b/ruoyi-ui/src/assets/styles/ruoyi.scss @@ -117,11 +117,9 @@ /** 表格布局 **/ .pagination-container { - position: relative; - height: 32px; - margin-bottom: 10px; - margin-top: 15px; - padding: 10px 20px !important; + display: flex; + justify-content: flex-end; + margin-top: 20px; } /* tree border */ @@ -132,11 +130,6 @@ border-radius: 4px; } -.pagination-container .el-pagination { - right: 0; - position: absolute; -} - @media (max-width: 768px) { .pagination-container .el-pagination > .el-pagination__jump { display: none !important; @@ -201,8 +194,6 @@ } .card-box { - padding-right: 15px; - padding-left: 15px; margin-bottom: 10px; } diff --git a/ruoyi-ui/src/components/Pagination/index.vue b/ruoyi-ui/src/components/Pagination/index.vue index 1617af004..c9470c271 100644 --- a/ruoyi-ui/src/components/Pagination/index.vue +++ b/ruoyi-ui/src/components/Pagination/index.vue @@ -106,7 +106,6 @@ export default {