!167 update 修改角色"菜单树选择项"和"部门树选择项"是否关联显示字段为Boolean类型
* fix 修改 postgres sql脚本,处理角色表字段类型错误问题。 * fix 修复postgreSQL新增或更新角色信息报错。修改角色"菜单树选择项"和"部门树选择项"是否关联显示字段为Boolean类型。
This commit is contained in:
parent
e6940d48e3
commit
a33898c2a0
@ -78,13 +78,13 @@ public class SysRole extends BaseEntity {
|
||||
* 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示)
|
||||
*/
|
||||
@ApiModelProperty(value = "菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示)")
|
||||
private Integer menuCheckStrictly;
|
||||
private Boolean menuCheckStrictly;
|
||||
|
||||
/**
|
||||
* 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 )
|
||||
*/
|
||||
@ApiModelProperty(value = "部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 )")
|
||||
private Integer deptCheckStrictly;
|
||||
private Boolean deptCheckStrictly;
|
||||
|
||||
/**
|
||||
* 角色状态(0正常 1停用)
|
||||
@ -136,34 +136,4 @@ public class SysRole extends BaseEntity {
|
||||
public boolean isAdmin() {
|
||||
return UserConstants.ADMIN_ID.equals(this.roleId);
|
||||
}
|
||||
|
||||
public Boolean getMenuCheckStrictly() {
|
||||
if (menuCheckStrictly == null) {
|
||||
return null;
|
||||
}
|
||||
return menuCheckStrictly == 1;
|
||||
}
|
||||
|
||||
public void setMenuCheckStrictly(Boolean menuCheckStrictly) {
|
||||
if (menuCheckStrictly == null) {
|
||||
this.menuCheckStrictly = null;
|
||||
return;
|
||||
}
|
||||
this.menuCheckStrictly = menuCheckStrictly ? 1 : 0;
|
||||
}
|
||||
|
||||
public Boolean getDeptCheckStrictly() {
|
||||
if (deptCheckStrictly == null) {
|
||||
return null;
|
||||
}
|
||||
return deptCheckStrictly == 1;
|
||||
}
|
||||
|
||||
public void setDeptCheckStrictly(Boolean deptCheckStrictly) {
|
||||
if (deptCheckStrictly == null) {
|
||||
this.deptCheckStrictly = null;
|
||||
return;
|
||||
}
|
||||
this.deptCheckStrictly = deptCheckStrictly ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
@ -157,8 +157,8 @@ create table if not exists sys_role
|
||||
role_key varchar(100) not null,
|
||||
role_sort int4 not null,
|
||||
data_scope char default '1'::bpchar,
|
||||
menu_check_strictly int2 default 1,
|
||||
dept_check_strictly int2 default 1,
|
||||
menu_check_strictly bool default true,
|
||||
dept_check_strictly bool default true,
|
||||
status char not null,
|
||||
del_flag char default '0'::bpchar,
|
||||
create_by varchar(64) default ''::varchar,
|
||||
@ -188,8 +188,8 @@ comment on column sys_role.remark is '备注';
|
||||
-- ----------------------------
|
||||
-- 初始化-角色信息表数据
|
||||
-- ----------------------------
|
||||
insert into sys_role values('1', '超级管理员', 'admin', 1, 1, 1, 1, '0', '0', 'admin', now(), '', null, '超级管理员');
|
||||
insert into sys_role values('2', '普通角色', 'common', 2, 2, 1, 1, '0', '0', 'admin', now(), '', null, '普通角色');
|
||||
insert into sys_role values('1', '超级管理员', 'admin', 1, '1', 't', 't', '0', '0', 'admin', now(), '', null, '超级管理员');
|
||||
insert into sys_role values('2', '普通角色', 'common', 2, '2', 't', 't', '0', '0', 'admin', now(), '', null, '普通角色');
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
|
@ -77,8 +77,8 @@ INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component,
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (1510, '测试树表删除', 1506, 4, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:remove', '#', 'admin', now(), '', NULL, '');
|
||||
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) VALUES (1511, '测试树表导出', 1506, 5, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:export', '#', 'admin', now(), '', NULL, '');
|
||||
|
||||
INSERT INTO sys_role(role_id, role_name, role_key, role_sort, data_scope, menu_check_strictly, dept_check_strictly, status, del_flag, create_by, create_time, update_by, update_time, remark) VALUES (3, '本部门及以下', 'test1', 3, '4', 1, 1, '0', '0', 'admin', now(), 'admin', NULL, NULL);
|
||||
INSERT INTO sys_role(role_id, role_name, role_key, role_sort, data_scope, menu_check_strictly, dept_check_strictly, status, del_flag, create_by, create_time, update_by, update_time, remark) VALUES (4, '仅本人', 'test2', 4, '5', 1, 1, '0', '0', 'admin', now(), 'admin', NULL, NULL);
|
||||
INSERT INTO sys_role(role_id, role_name, role_key, role_sort, data_scope, menu_check_strictly, dept_check_strictly, status, del_flag, create_by, create_time, update_by, update_time, remark) VALUES (3, '本部门及以下', 'test1', 3, '4', 't', 't', '0', '0', 'admin', now(), 'admin', NULL, NULL);
|
||||
INSERT INTO sys_role(role_id, role_name, role_key, role_sort, data_scope, menu_check_strictly, dept_check_strictly, status, del_flag, create_by, create_time, update_by, update_time, remark) VALUES (4, '仅本人', 'test2', 4, '5', 't', 't', '0', '0', 'admin', now(), 'admin', NULL, NULL);
|
||||
|
||||
INSERT INTO sys_role_menu(role_id, menu_id) VALUES (3, 1);
|
||||
INSERT INTO sys_role_menu(role_id, menu_id) VALUES (3, 5);
|
||||
|
Loading…
x
Reference in New Issue
Block a user