From 478fae0d28938739a0b27c21f25178fd197dee6a Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期六, 19 九月 2020 13:42:37 +0800 Subject: [PATCH] 菜单&数据权限新增(展开/折叠 全选/全不选 父子联动) --- ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml | 8 + ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java | 5 ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java | 3 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java | 8 + ruoyi-ui/src/views/system/role/index.vue | 49 ++++++++++++ sql/ry_20200919.sql | 30 ++++--- ruoyi-ui/src/views/system/user/index.vue | 2 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java | 8 + ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java | 26 ++++++ ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml | 8 + ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml | 34 +++++--- ruoyi-ui/src/assets/styles/ruoyi.scss | 8 ++ 12 files changed, 150 insertions(+), 39 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java index 9330f8e..ff8ae80 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java @@ -37,6 +37,12 @@ @Excel(name = "鏁版嵁鑼冨洿", readConverterExp = "1=鎵�鏈夋暟鎹潈闄�,2=鑷畾涔夋暟鎹潈闄�,3=鏈儴闂ㄦ暟鎹潈闄�,4=鏈儴闂ㄥ強浠ヤ笅鏁版嵁鏉冮檺") private String dataScope; + /** 鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙0锛氱埗瀛愪簰鐩稿叧鑱旀樉绀� 1锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず锛� */ + private boolean menuCheckStrictly; + + /** 閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙0锛氱埗瀛愪簰鐩稿叧鑱旀樉绀� 1锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず锛� */ + private boolean deptCheckStrictly; + /** 瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛� */ @Excel(name = "瑙掕壊鐘舵��", readConverterExp = "0=姝e父,1=鍋滅敤") private String status; @@ -128,6 +134,26 @@ this.dataScope = dataScope; } + public boolean isMenuCheckStrictly() + { + return menuCheckStrictly; + } + + public void setMenuCheckStrictly(boolean menuCheckStrictly) + { + this.menuCheckStrictly = menuCheckStrictly; + } + + public boolean isDeptCheckStrictly() + { + return deptCheckStrictly; + } + + public void setDeptCheckStrictly(boolean deptCheckStrictly) + { + this.deptCheckStrictly = deptCheckStrictly; + } + public String getStatus() { return status; diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java index 6261a87..cead656 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java @@ -23,9 +23,10 @@ * 鏍规嵁瑙掕壊ID鏌ヨ閮ㄩ棬鏍戜俊鎭� * * @param roleId 瑙掕壊ID + * @param deptCheckStrictly 閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀� * @return 閫変腑閮ㄩ棬鍒楄〃 */ - public List<Integer> selectDeptListByRoleId(Long roleId); + public List<Integer> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly); /** * 鏍规嵁閮ㄩ棬ID鏌ヨ淇℃伅 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java index ebb2546..773e6e8 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java @@ -59,11 +59,12 @@ /** * 鏍规嵁瑙掕壊ID鏌ヨ鑿滃崟鏍戜俊鎭� - * + * * @param roleId 瑙掕壊ID + * @param menuCheckStrictly 鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀� * @return 閫変腑鑿滃崟鍒楄〃 */ - public List<Integer> selectMenuListByRoleId(Long roleId); + public List<Integer> selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly); /** * 鏍规嵁鑿滃崟ID鏌ヨ淇℃伅 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index d32e033..35f6276 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -10,9 +10,11 @@ import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.core.domain.TreeSelect; import com.ruoyi.common.core.domain.entity.SysDept; +import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.exception.CustomException; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.mapper.SysDeptMapper; +import com.ruoyi.system.mapper.SysRoleMapper; import com.ruoyi.system.service.ISysDeptService; /** @@ -25,6 +27,9 @@ { @Autowired private SysDeptMapper deptMapper; + + @Autowired + private SysRoleMapper roleMapper; /** * 鏌ヨ閮ㄩ棬绠$悊鏁版嵁 @@ -93,7 +98,8 @@ @Override public List<Integer> selectDeptListByRoleId(Long roleId) { - return deptMapper.selectDeptListByRoleId(roleId); + SysRole role = roleMapper.selectRoleById(roleId); + return deptMapper.selectDeptListByRoleId(roleId, role.isDeptCheckStrictly()); } /** diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java index 51fb662..fab1efe 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java @@ -13,12 +13,14 @@ import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.core.domain.TreeSelect; import com.ruoyi.common.core.domain.entity.SysMenu; +import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.domain.vo.MetaVo; import com.ruoyi.system.domain.vo.RouterVo; import com.ruoyi.system.mapper.SysMenuMapper; +import com.ruoyi.system.mapper.SysRoleMapper; import com.ruoyi.system.mapper.SysRoleMenuMapper; import com.ruoyi.system.service.ISysMenuService; @@ -34,6 +36,9 @@ @Autowired private SysMenuMapper menuMapper; + + @Autowired + private SysRoleMapper roleMapper; @Autowired private SysRoleMenuMapper roleMenuMapper; @@ -124,7 +129,8 @@ @Override public List<Integer> selectMenuListByRoleId(Long roleId) { - return menuMapper.selectMenuListByRoleId(roleId); + SysRole role = roleMapper.selectRoleById(roleId); + return menuMapper.selectMenuListByRoleId(roleId, role.isMenuCheckStrictly()); } /** diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml index 36c2aa5..cdc26f4 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -44,12 +44,14 @@ order by d.parent_id, d.order_num </select> - <select id="selectDeptListByRoleId" parameterType="Long" resultType="Integer"> - select d.dept_id, d.parent_id + <select id="selectDeptListByRoleId" resultType="Integer"> + select d.dept_id from sys_dept d left join sys_role_dept rd on d.dept_id = rd.dept_id where rd.role_id = #{roleId} - and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId}) + <if test="deptCheckStrictly"> + and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId}) + </if> order by d.parent_id, d.order_num </select> diff --git a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml index 83d161e..051eea4 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml @@ -82,12 +82,14 @@ order by m.parent_id, m.order_num </select> - <select id="selectMenuListByRoleId" parameterType="Long" resultType="Integer"> - select m.menu_id, m.parent_id + <select id="selectMenuListByRoleId" resultType="Integer"> + select m.menu_id from sys_menu m left join sys_role_menu rm on m.menu_id = rm.menu_id where rm.role_id = #{roleId} - and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId}) + <if test="menuCheckStrictly"> + and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId}) + </if> order by m.parent_id, m.order_num </select> diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml index c2b3049..e86c4c6 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -5,22 +5,24 @@ <mapper namespace="com.ruoyi.system.mapper.SysRoleMapper"> <resultMap type="SysRole" id="SysRoleResult"> - <id property="roleId" column="role_id" /> - <result property="roleName" column="role_name" /> - <result property="roleKey" column="role_key" /> - <result property="roleSort" column="role_sort" /> - <result property="dataScope" column="data_scope" /> - <result property="status" column="status" /> - <result property="delFlag" column="del_flag" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="updateBy" column="update_by" /> - <result property="updateTime" column="update_time" /> - <result property="remark" column="remark" /> + <id property="roleId" column="role_id" /> + <result property="roleName" column="role_name" /> + <result property="roleKey" column="role_key" /> + <result property="roleSort" column="role_sort" /> + <result property="dataScope" column="data_scope" /> + <result property="menuCheckStrictly" column="menu_check_strictly" /> + <result property="deptCheckStrictly" column="dept_check_strictly" /> + <result property="status" column="status" /> + <result property="delFlag" column="del_flag" /> + <result property="createBy" column="create_by" /> + <result property="createTime" column="create_time" /> + <result property="updateBy" column="update_by" /> + <result property="updateTime" column="update_time" /> + <result property="remark" column="remark" /> </resultMap> <sql id="selectRoleVo"> - select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, + select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly, r.status, r.del_flag, r.create_time, r.remark from sys_role r left join sys_user_role ur on ur.role_id = r.role_id @@ -95,6 +97,8 @@ <if test="roleKey != null and roleKey != ''">role_key,</if> <if test="roleSort != null and roleSort != ''">role_sort,</if> <if test="dataScope != null and dataScope != ''">data_scope,</if> + <if test="menuCheckStrictly != null and menuCheckStrictly != ''">menu_check_strictly,</if> + <if test="deptCheckStrictly != null and deptCheckStrictly != ''">dept_check_strictly,</if> <if test="status != null and status != ''">status,</if> <if test="remark != null and remark != ''">remark,</if> <if test="createBy != null and createBy != ''">create_by,</if> @@ -105,6 +109,8 @@ <if test="roleKey != null and roleKey != ''">#{roleKey},</if> <if test="roleSort != null and roleSort != ''">#{roleSort},</if> <if test="dataScope != null and dataScope != ''">#{dataScope},</if> + <if test="menuCheckStrictly != null">#{menu_check_strictly},</if> + <if test="deptCheckStrictly != null">#{dept_check_strictly},</if> <if test="status != null and status != ''">#{status},</if> <if test="remark != null and remark != ''">#{remark},</if> <if test="createBy != null and createBy != ''">#{createBy},</if> @@ -119,6 +125,8 @@ <if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if> <if test="roleSort != null and roleSort != ''">role_sort = #{roleSort},</if> <if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if> + <if test="menuCheckStrictly != null">menu_check_strictly = #{menuCheckStrictly},</if> + <if test="deptCheckStrictly != null">dept_check_strictly = #{deptCheckStrictly},</if> <if test="status != null and status != ''">status = #{status},</if> <if test="remark != null">remark = #{remark},</if> <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> diff --git a/ruoyi-ui/src/assets/styles/ruoyi.scss b/ruoyi-ui/src/assets/styles/ruoyi.scss index 86675e5..7ceddcd 100644 --- a/ruoyi-ui/src/assets/styles/ruoyi.scss +++ b/ruoyi-ui/src/assets/styles/ruoyi.scss @@ -92,6 +92,14 @@ padding: 10px 20px !important; } +/* tree border */ +.tree-border { + margin-top: 5px; + border: 1px solid #e5e6e7; + background: #FFFFFF none; + border-radius:4px; +} + .pagination-container .el-pagination { right: 0; position: absolute; diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue index 7780c1f..9c760f6 100644 --- a/ruoyi-ui/src/views/system/role/index.vue +++ b/ruoyi-ui/src/views/system/role/index.vue @@ -175,11 +175,16 @@ </el-radio-group> </el-form-item> <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-tree + class="tree-border" :data="menuOptions" show-checkbox ref="menu" node-key="id" + :check-strictly="!form.menuCheckStrictly" empty-text="鍔犺浇涓紝璇风◢鍚�" :props="defaultProps" ></el-tree> @@ -214,12 +219,17 @@ </el-select> </el-form-item> <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-tree + class="tree-border" :data="deptOptions" show-checkbox default-expand-all ref="dept" node-key="id" + :check-strictly="!form.deptCheckStrictly" empty-text="鍔犺浇涓紝璇风◢鍚�" :props="defaultProps" ></el-tree> @@ -262,6 +272,10 @@ open: false, // 鏄惁鏄剧ず寮瑰嚭灞傦紙鏁版嵁鏉冮檺锛� openDataScope: false, + menuExpand: false, + menuNodeAll: false, + deptExpand: true, + deptNodeAll: false, // 鏃ユ湡鑼冨洿 dateRange: [], // 鐘舵�佹暟鎹瓧鍏� @@ -413,6 +427,10 @@ if (this.$refs.menu != undefined) { this.$refs.menu.setCheckedKeys([]); } + this.menuExpand = false, + this.menuNodeAll = false, + this.deptExpand = true, + this.deptNodeAll = false, this.form = { roleId: undefined, roleName: undefined, @@ -421,6 +439,7 @@ status: "0", menuIds: [], deptIds: [], + menuCheckStrictly: true, remark: undefined }; this.resetForm("form"); @@ -442,6 +461,36 @@ this.single = selection.length!=1 this.multiple = !selection.length }, + // 鏍戞潈闄愶紙灞曞紑/鎶樺彔锛� + handleCheckedTreeExpand(value, type) { + if (type == 'menu') { + let treeList = this.menuOptions; + for (let i = 0; i < treeList.length; i++) { + this.$refs.menu.store.nodesMap[treeList[i].id].expanded = value; + } + } else if (type == 'dept') { + let treeList = this.deptOptions; + for (let i = 0; i < treeList.length; i++) { + this.$refs.dept.store.nodesMap[treeList[i].id].expanded = value; + } + } + }, + // 鏍戞潈闄愶紙鍏ㄩ��/鍏ㄤ笉閫夛級 + handleCheckedTreeNodeAll(value, type) { + if (type == 'menu') { + this.$refs.menu.setCheckedNodes(value ? this.menuOptions: []); + } else if (type == 'dept') { + this.$refs.dept.setCheckedNodes(value ? this.deptOptions: []); + } + }, + // 鏍戞潈闄愶紙鐖跺瓙鑱斿姩锛� + handleCheckedTreeConnect(value, type) { + if (type == 'menu') { + this.form.menuCheckStrictly = value ? true: false; + } else if (type == 'dept') { + this.form.deptCheckStrictly = value ? true: false; + } + }, /** 鏂板鎸夐挳鎿嶄綔 */ handleAdd() { this.reset(); diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index 1696bba..f4174e0 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -93,7 +93,7 @@ </el-col> <el-col :span="12"> <el-form-item label="褰掑睘閮ㄩ棬" prop="deptId"> - <treeselect v-model="form.deptId" :options="deptOptions" :disable-branch-nodes="true" :show-count="true" placeholder="璇烽�夋嫨褰掑睘閮ㄩ棬" /> + <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="璇烽�夋嫨褰掑睘閮ㄩ棬" /> </el-form-item> </el-col> </el-row> diff --git a/sql/ry_20200901.sql b/sql/ry_20200919.sql similarity index 96% rename from sql/ry_20200901.sql rename to sql/ry_20200919.sql index 3a9be71..5dc972e 100644 --- a/sql/ry_20200901.sql +++ b/sql/ry_20200919.sql @@ -102,26 +102,28 @@ -- ---------------------------- drop table if exists sys_role; create table sys_role ( - role_id bigint(20) not null auto_increment comment '瑙掕壊ID', - role_name varchar(30) not null comment '瑙掕壊鍚嶇О', - role_key varchar(100) not null comment '瑙掕壊鏉冮檺瀛楃涓�', - role_sort int(4) not null comment '鏄剧ず椤哄簭', - data_scope char(1) default '1' comment '鏁版嵁鑼冨洿锛�1锛氬叏閮ㄦ暟鎹潈闄� 2锛氳嚜瀹氭暟鎹潈闄� 3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺 4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶級', - status char(1) not null comment '瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛�', - del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�', - create_by varchar(64) default '' comment '鍒涘缓鑰�', - create_time datetime comment '鍒涘缓鏃堕棿', - update_by varchar(64) default '' comment '鏇存柊鑰�', - update_time datetime comment '鏇存柊鏃堕棿', - remark varchar(500) default null comment '澶囨敞', + role_id bigint(20) not null auto_increment comment '瑙掕壊ID', + role_name varchar(30) not null comment '瑙掕壊鍚嶇О', + role_key varchar(100) not null comment '瑙掕壊鏉冮檺瀛楃涓�', + role_sort int(4) not null comment '鏄剧ず椤哄簭', + data_scope char(1) default '1' comment '鏁版嵁鑼冨洿锛�1锛氬叏閮ㄦ暟鎹潈闄� 2锛氳嚜瀹氭暟鎹潈闄� 3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺 4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶級', + menu_check_strictly tinyint(1) default 1 comment '鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�', + dept_check_strictly tinyint(1) default 1 comment '閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�', + status char(1) not null comment '瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛�', + del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�', + create_by varchar(64) default '' comment '鍒涘缓鑰�', + create_time datetime comment '鍒涘缓鏃堕棿', + update_by varchar(64) default '' comment '鏇存柊鑰�', + update_time datetime comment '鏇存柊鏃堕棿', + remark varchar(500) default null comment '澶囨敞', primary key (role_id) ) engine=innodb auto_increment=100 comment = '瑙掕壊淇℃伅琛�'; -- ---------------------------- -- 鍒濆鍖�-瑙掕壊淇℃伅琛ㄦ暟鎹� -- ---------------------------- -insert into sys_role values('1', '瓒呯骇绠$悊鍛�', 'admin', 1, 1, '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '瓒呯骇绠$悊鍛�'); -insert into sys_role values('2', '鏅�氳鑹�', 'common', 2, 2, '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '鏅�氳鑹�'); +insert into sys_role values('1', '瓒呯骇绠$悊鍛�', 'admin', 1, 1, 1, 1, '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '瓒呯骇绠$悊鍛�'); +insert into sys_role values('2', '鏅�氳鑹�', 'common', 2, 2, 1, 1, '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '鏅�氳鑹�'); -- ---------------------------- -- Gitblit v1.9.3