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

如果构建动态复杂查询语句 #7353

Open
zsy619 opened this issue Jan 23, 2025 · 1 comment
Open

如果构建动态复杂查询语句 #7353

zsy619 opened this issue Jan 23, 2025 · 1 comment
Assignees
Labels
type:question general questions

Comments

@zsy619
Copy link

zsy619 commented Jan 23, 2025

Your Question

Image
检索条件 左侧分类 and (名称 or 编码 or 型号) ,如果名称、编码、型号有任意值,在构建检索条件,否则不进行检索,这样动态的查询语句如果构建?
如可能会出现如下情况:
分类=90 and (名称 like '%测试%' or 编码 like '%123%')
分类=90 and (名称 like '%测试%')
分类=90

The document you expected this should be explained

Expected answer

@zsy619 zsy619 added the type:question general questions label Jan 23, 2025
@zsy619 zsy619 closed this as completed Jan 23, 2025
@zsy619
Copy link
Author

zsy619 commented Jan 23, 2025

使用gorm gen工具生成代码之后,如何构建

@zsy619 zsy619 reopened this Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question general questions
Projects
None yet
Development

No branches or pull requests

2 participants