Skip to content

[功能改进]: DataPermissionInterceptor 通过mappedStatementId来判断要执行的SQL,无法对IService支持的默认方法做区分 #6756

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
nOObcOderJxs opened this issue Mar 26, 2025 · 1 comment

Comments

@nOObcOderJxs
Copy link

确认

  • 我的版本是最新版本, 我的版本号与 version 相同, 并且项目里无依赖冲突
  • 我已经在 issue 中搜索过, 确认问题没有被提出过
  • 我已经修改标题, 将标题中的 描述 替换为遇到的问题

功能改进

问题背景:使用Mybatis-plus [IService]中的方法时,不能对区分使用场景进行数据权限的添加,为了更好的使用数据权限只能使用XML等自定义SQL的方式来配合DataPermissionInterceptor的使用
希望添加的功能:可以在getSqlSegment方法入参数传入待执行的SQL(String),可以通过对SQL的comment做字符匹配来更加灵活的进行权限校验

参考资料

No response

@nieqiurong
Copy link
Contributor

自行通过threadlocal维护把,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants