!SysUser.isAdmin(SecurityUtils.getUserId())
时间: 2023-12-23 08:05:44 浏览: 134
获取用户名称
4星 · 用户满意度95%
!SysUser.isAdmin(SecurityUtils.getUserId())是在service层的checkUserDataScope()方法中使用的条件判断语句。它的作用是判断当前用户是否为管理员。如果当前用户不是管理员,则执行后续的代码逻辑,否则跳过该逻辑。\[1\]
#### 引用[.reference_title]
- *1* *3* [entity层、dao层、mapper层、service层、controller简单总结 记录](https://blog.csdn.net/qq_40963664/article/details/125897104)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [跟着开源项目学java4-从防止数据权限越权的提交看开源项目里数据权限怎么做](https://blog.csdn.net/qq_39007838/article/details/128452746)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文