当前位置:网站首页>Permission management - role assignment menu
Permission management - role assignment menu
2022-07-25 16:05:00 【Leon_ Jinhai_ Sun】
//========================= Assign a menu to a role ======================= Is to add data to the intermediary table
@Override
public void saveRolePermissionRealtionShipGuli(String roleId, String[] permissionIds) {
//roleId role id
//permissionId menu id Array form
// A role has multiple menus , Finally, it is added in batch in the form of a set .
//1 establish list aggregate , Used to encapsulate and add data
List<RolePermission> rolePermissionList = new ArrayList<>();
// Traverse all menu arrays
for(String perId : permissionIds) {
//RolePermission object
RolePermission rolePermission = new RolePermission();
rolePermission.setRoleId(roleId);
rolePermission.setPermissionId(perId);
// Package to list aggregate , Add one by one
rolePermissionList.add(rolePermission);
}
// Add to role menu relationship table , Batch addition
rolePermissionService.saveBatch(rolePermissionList);
}边栏推荐
- 2600 pages in total! Another divine interview manual is available~
- leetcode:154. 寻找旋转排序数组中的最小值 II【关于旋转排序数组的中后定位二分法】
- Leetcode - 225 implements stack with queue
- Beyond Compare 4 实现class文件对比【最新】
- 没错,请求DNS服务器还可以使用UDP协议
- R语言ggplot2可视化线图(line)、自定义配置标题文本相关内容颜色和图例(legend)颜色相匹配(和分组线图的颜色相匹配、match colors of groups)
- MySQL乐观锁
- 兆骑科创高质量海归人才双创服务平台,线上直播路演
- HDD杭州站·HarmonyOS技术专家分享HUAWEI DevEco Studio特色功能
- mysql 表读锁
猜你喜欢

如何构建面向海量数据、高实时要求的企业级OLAP数据引擎?

Reasons for data format conversion when matlab reads the displayed image
![Leetcode:6127. Number of high-quality number pairs [bit operation finding rules + the sum of two numbers is greater than or equal to K + dichotomy]](/img/b5/5c7fc70b8025cf7ef21d645a3ac22e.png)
Leetcode:6127. Number of high-quality number pairs [bit operation finding rules + the sum of two numbers is greater than or equal to K + dichotomy]

SVD singular value decomposition derivation and application and signal recovery

Pytoch learning notes -- Summary of common functions 3

tkinter模块高级操作(一)—— 透明按钮、透明文本框、自定义按钮及自定义文本框

电阻电路的等效变化(Ⅱ)

Why is preparestatement better and safer?
![[wechat applet] detailed explanation of applet host environment](/img/57/582c07f6e6443f9f139fb1af225ea4.png)
[wechat applet] detailed explanation of applet host environment

HDD杭州站·HarmonyOS技术专家分享HUAWEI DevEco Studio特色功能
随机推荐
Record Locks(记录锁)
乐观锁悲观锁适用场景
leetcode:6127. 优质数对的数目【位运算找规律 + 两数之和大于等于k + 二分】
Pytoch learning notes -- seresnet50 construction
leetcode:154. 寻找旋转排序数组中的最小值 II【关于旋转排序数组的中后定位二分法】
mysql意向锁
MySQL tutorial 65 data in MySQL operation table
Redis distributed lock, it's really impossible without it
Leetcode - 379 telephone directory management system (Design)
Wavelet transform --dwt2 and wavedec2
狂神redis笔记12
泰雷兹推出解决方案,助力SAP客户控制云端数据
[server data recovery] data recovery cases of raid information loss caused by unexpected power failure of HP EVA server storage
Pytoch learning notes - Teacher Liu Er RNN advanced chapter - code comments and results
MySQL教程68-AS 设置别名
MySQL教程66-数据表查询语句
面试8家公司,1周拿了5个offer,分享一下自己的心得
Leetcode - 380 o (1) time to insert, delete and get random elements (design hash table + array)
July 25th, 2022 Daily: Microsoft proposed CodeT: a new SOTA for code generation, with 20 points of performance improvement
一文入门Redis