update 优化 SysRole 部分字段类型 防止数据库类型映射异常

feature/model
疯狂的狮子li 3 years ago
parent 880b3290e8
commit 49ac180329

@ -77,13 +77,13 @@ public class SysRole extends BaseEntity {
* 0 1
*/
@ApiModelProperty(value = "菜单树选择项是否关联显示( 0父子不互相关联显示 1父子互相关联显示")
private boolean menuCheckStrictly;
private Integer menuCheckStrictly;
/**
* 0 1
*/
@ApiModelProperty(value = "部门树选择项是否关联显示0父子不互相关联显示 1父子互相关联显示 ")
private boolean deptCheckStrictly;
private Integer deptCheckStrictly;
/**
* 0 1

@ -85,7 +85,7 @@ public class SysDeptServiceImpl implements ISysDeptService {
@Override
public List<Long> selectDeptListByRoleId(Long roleId) {
SysRole role = roleMapper.selectById(roleId);
return baseMapper.selectDeptListByRoleId(roleId, role.isDeptCheckStrictly());
return baseMapper.selectDeptListByRoleId(roleId, role.getDeptCheckStrictly() == 1);
}
/**

@ -123,7 +123,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
@Override
public List<Long> selectMenuListByRoleId(Long roleId) {
SysRole role = roleMapper.selectById(roleId);
return baseMapper.selectMenuListByRoleId(roleId, role.isMenuCheckStrictly());
return baseMapper.selectMenuListByRoleId(roleId, role.getMenuCheckStrictly() == 1);
}
/**

@ -187,14 +187,14 @@
<el-form-item label="菜单权限">
<el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">/</el-checkbox>
<el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">/</el-checkbox>
<el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')"></el-checkbox>
<el-checkbox v-model="form.menuCheckStrictly == 1" @change="handleCheckedTreeConnect($event, 'menu')"></el-checkbox>
<el-tree
class="tree-border"
:data="menuOptions"
show-checkbox
ref="menu"
node-key="id"
:check-strictly="!form.menuCheckStrictly"
:check-strictly="!form.menuCheckStrictly == 1"
empty-text="加载中,请稍候"
:props="defaultProps"
></el-tree>
@ -231,7 +231,7 @@
<el-form-item label="数据权限" v-show="form.dataScope == 2">
<el-checkbox v-model="deptExpand" @change="handleCheckedTreeExpand($event, 'dept')">/</el-checkbox>
<el-checkbox v-model="deptNodeAll" @change="handleCheckedTreeNodeAll($event, 'dept')">/</el-checkbox>
<el-checkbox v-model="form.deptCheckStrictly" @change="handleCheckedTreeConnect($event, 'dept')"></el-checkbox>
<el-checkbox v-model="form.deptCheckStrictly == 1" @change="handleCheckedTreeConnect($event, 'dept')"></el-checkbox>
<el-tree
class="tree-border"
:data="deptOptions"
@ -239,7 +239,7 @@
default-expand-all
ref="dept"
node-key="id"
:check-strictly="!form.deptCheckStrictly"
:check-strictly="!form.deptCheckStrictly == 1"
empty-text="加载中,请稍候"
:props="defaultProps"
></el-tree>
@ -440,8 +440,8 @@ export default {
status: "0",
menuIds: [],
deptIds: [],
menuCheckStrictly: true,
deptCheckStrictly: true,
menuCheckStrictly: 1,
deptCheckStrictly: 1,
remark: undefined
};
this.resetForm("form");
@ -501,9 +501,9 @@ export default {
//
handleCheckedTreeConnect(value, type) {
if (type == 'menu') {
this.form.menuCheckStrictly = value ? true: false;
this.form.menuCheckStrictly = value ? 1: 0;
} else if (type == 'dept') {
this.form.deptCheckStrictly = value ? true: false;
this.form.deptCheckStrictly = value ? 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 smallint default 1,
dept_check_strictly smallint default 1,
menu_check_strictly int2 default 1,
dept_check_strictly int2 default 1,
status char not null,
del_flag char default '0'::bpchar,
create_by varchar(64) default ''::varchar,

Loading…
Cancel
Save