Skip to content
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

[功能改进]: Mapper层生成索引通用查询方法 #6572

Open
3 tasks done
nieqiurong opened this issue Nov 3, 2024 · 0 comments
Open
3 tasks done

[功能改进]: Mapper层生成索引通用查询方法 #6572

nieqiurong opened this issue Nov 3, 2024 · 0 comments

Comments

@nieqiurong
Copy link
Contributor

nieqiurong commented Nov 3, 2024

确认

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

功能改进

分析表索引,生成通用方法.
默认生成几个内置的方法,提供索引字段方法方法,允许用户自定义扩展生成其他方法.
组合索引说明:
由于组合情况生成交叉可能组合有点多,默认只生成一个方法多个字段用And拼接,传值自行控制,空值默认会自动过滤.
例如:
唯一索引 card_no

  1. UserInfo selectByCardNo(String no)
  2. int deleteByCardNo(String cardNo)
  3. int updateByCardNo(UserInfo entity, String cardNo)

普通索引 organizationId

  1. List selectByOrganizationId(Integer organizationId)
  2. int updateByOrganizationId(UserInfo entity, Integer organizationId)
  3. int deleteByOrganizationId(Integer organizationId)

组合索引 card_no,name

  1. List selectByCardNoAndName(String cardNo, String name)
  2. int updateByCardNoAndName(UserInfo entity, String cardNo, String name)
  3. int deleteByCardNoAndName(String cardNo, String name)

image

参考资料

No response

nieqiurong added a commit that referenced this issue Nov 3, 2024
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

1 participant