V3.2.22

date:2024-04-12 (仅授权版更新)下载地址

1、修复用户选择器回显问题

2、修复图片上传组件只上传一张图片时回显问题

3、完善角色授权模式

3.1、角色有效期和有效时间段设置,若设置了有效日期,只能在该时区内有权限访问
3.2、数据权限功能完善,可针对不同菜单设置不同的数据权限,数据权限划分更细化




4、代码生成完善

4.1、表描述生成具体业务名称,方法描述生成接口标签
4.2、日期时间段搜索验证错误修复
4.2、生成组件名报错修复

从v3.2.21升级到此版本,覆盖文件即可,无第三方依赖库修改

数据库更新,请执行对应sql语句更新:

#mysql 执行此段
INSERT INTO `sys_auth_rule` (`pid`, `name`, `title`, `icon`, `condition`, `remark`, `menu_type`, `weigh`, `is_hide`, `path`, `component`, `is_link`, `module_type`, `model_id`, `is_iframe`, `is_cached`, `redirect`, `is_affix`, `link_url`, `created_at`, `updated_at`) VALUES (10, 'api/v1/system/role/dataScope', '授权数据权限', '', '', '', 2, 0, 0, '', '', 0, '', 0, 0, 1, '', 0, '', '2024-04-11 11:18:23', '2024-04-11 11:19:17');
INSERT INTO `sys_auth_rule` (`pid`, `name`, `title`, `icon`, `condition`, `remark`, `menu_type`, `weigh`, `is_hide`, `path`, `component`, `is_link`, `module_type`, `model_id`, `is_iframe`, `is_cached`, `redirect`, `is_affix`, `link_url`, `created_at`, `updated_at`) VALUES (10, 'api/v1/system/role/setRoleUser', '授权用户权限', '', '', '', 2, 0, 0, '', '', 0, '', 0, 0, 1, '', 0, '', '2024-04-11 11:18:59', '2024-04-11 11:18:59');
INSERT INTO `sys_auth_rule` ( `pid`, `name`, `title`, `icon`, `condition`, `remark`, `menu_type`, `weigh`, `is_hide`, `path`, `component`, `is_link`, `module_type`, `model_id`, `is_iframe`, `is_cached`, `redirect`, `is_affix`, `link_url`, `created_at`, `updated_at`) VALUES ( 26, 'api/v1/system/user/add', '新增用户', '', '', '', 2, 0, 0, '', '', 0, '', 0, 0, 1, '', 0, '', '2024-04-11 11:16:14', '2024-04-11 11:16:14');
INSERT INTO `sys_auth_rule` ( `pid`, `name`, `title`, `icon`, `condition`, `remark`, `menu_type`, `weigh`, `is_hide`, `path`, `component`, `is_link`, `module_type`, `model_id`, `is_iframe`, `is_cached`, `redirect`, `is_affix`, `link_url`, `created_at`, `updated_at`) VALUES ( 26, 'api/v1/system/user/edit', '修改用户', '', '', '', 2, 0, 0, '', '', 0, '', 0, 0, 1, '', 0, '', '2024-04-11 11:16:45', '2024-04-11 11:19:25');
INSERT INTO `sys_auth_rule` ( `pid`, `name`, `title`, `icon`, `condition`, `remark`, `menu_type`, `weigh`, `is_hide`, `path`, `component`, `is_link`, `module_type`, `model_id`, `is_iframe`, `is_cached`, `redirect`, `is_affix`, `link_url`, `created_at`, `updated_at`) VALUES ( 26, 'api/v1/system/user/getEdit', '用户信息', '', '', '', 2, 0, 0, '', '', 0, '', 0, 0, 1, '', 0, '', '2024-04-11 11:17:21', '2024-04-11 11:19:30');
INSERT INTO `sys_auth_rule` ( `pid`, `name`, `title`, `icon`, `condition`, `remark`, `menu_type`, `weigh`, `is_hide`, `path`, `component`, `is_link`, `module_type`, `model_id`, `is_iframe`, `is_cached`, `redirect`, `is_affix`, `link_url`, `created_at`, `updated_at`) VALUES ( 26, 'api/v1/system/user/delete', '删除用户', '', '', '', 2, 0, 0, '', '', 0, '', 0, 0, 1, '', 0, '', '2024-04-11 11:17:39', '2024-04-11 11:19:34');

CREATE TABLE `sys_role_scope`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `role_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '角色id',
  `menu_id` int(11) NOT NULL COMMENT 'api接口id',
  `data_scope` int(11) NOT NULL COMMENT '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)',
  `dept_ids` json NULL COMMENT '扩展数据',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `role_id`(`role_id`, `menu_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色数据权限' ROW_FORMAT = Dynamic;
#pg 执行此段
INSERT INTO sys_auth_rule (pid, name, title, icon, condition, remark, menu_type, weigh, is_hide, path, component, is_link, module_type, model_id, is_iframe, is_cached, redirect, is_affix, link_url, created_at, updated_at) VALUES (10, 'api/v1/system/role/dataScope', '授权数据权限', '', '', '', 2, 0, 0, '', '', 0, '', 0, 0, 1, '', 0, '', '2024-04-11 11:18:23', '2024-04-11 11:19:17');
INSERT INTO sys_auth_rule (pid, name, title, icon, condition, remark, menu_type, weigh, is_hide, path, component, is_link, module_type, model_id, is_iframe, is_cached, redirect, is_affix, link_url, created_at, updated_at) VALUES (10, 'api/v1/system/role/setRoleUser', '授权用户权限', '', '', '', 2, 0, 0, '', '', 0, '', 0, 0, 1, '', 0, '', '2024-04-11 11:18:59', '2024-04-11 11:18:59');
INSERT INTO sys_auth_rule ( pid, name, title, icon, condition, remark, menu_type, weigh, is_hide, path, component, is_link, module_type, model_id, is_iframe, is_cached, redirect, is_affix, link_url, created_at, updated_at) VALUES ( 26, 'api/v1/system/user/add', '新增用户', '', '', '', 2, 0, 0, '', '', 0, '', 0, 0, 1, '', 0, '', '2024-04-11 11:16:14', '2024-04-11 11:16:14');
INSERT INTO sys_auth_rule ( pid, name, title, icon, condition, remark, menu_type, weigh, is_hide, path, component, is_link, module_type, model_id, is_iframe, is_cached, redirect, is_affix, link_url, created_at, updated_at) VALUES ( 26, 'api/v1/system/user/edit', '修改用户', '', '', '', 2, 0, 0, '', '', 0, '', 0, 0, 1, '', 0, '', '2024-04-11 11:16:45', '2024-04-11 11:19:25');
INSERT INTO sys_auth_rule ( pid, name, title, icon, condition, remark, menu_type, weigh, is_hide, path, component, is_link, module_type, model_id, is_iframe, is_cached, redirect, is_affix, link_url, created_at, updated_at) VALUES ( 26, 'api/v1/system/user/getEdit', '用户信息', '', '', '', 2, 0, 0, '', '', 0, '', 0, 0, 1, '', 0, '', '2024-04-11 11:17:21', '2024-04-11 11:19:30');
INSERT INTO sys_auth_rule ( pid, name, title, icon, condition, remark, menu_type, weigh, is_hide, path, component, is_link, module_type, model_id, is_iframe, is_cached, redirect, is_affix, link_url, created_at, updated_at) VALUES ( 26, 'api/v1/system/user/delete', '删除用户', '', '', '', 2, 0, 0, '', '', 0, '', 0, 0, 1, '', 0, '', '2024-04-11 11:17:39', '2024-04-11 11:19:34');

CREATE TABLE sys_role_scope (  
  id bigserial PRIMARY KEY,  
  role_id bigint NOT NULL DEFAULT 0,  
  menu_id integer NOT NULL,  
  data_scope integer NOT NULL,  
  dept_ids json,  
  UNIQUE (role_id, menu_id)  
) WITH (OIDS=FALSE);  

COMMENT ON TABLE sys_role_scope IS '角色数据权限';  
COMMENT ON COLUMN sys_role_scope.id IS 'ID';  
COMMENT ON COLUMN sys_role_scope.role_id IS '角色id';  
COMMENT ON COLUMN sys_role_scope.menu_id IS 'api接口id';  
COMMENT ON COLUMN sys_role_scope.data_scope IS '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)';  
COMMENT ON COLUMN sys_role_scope.dept_ids IS '扩展数据';
作者:管理员  创建时间:2024-04-12 17:57
最后编辑:管理员  更新时间:2024-11-21 09:37