Your Question
检索条件 左侧分类 and (名称 or 编码 or 型号) ,如果名称、编码、型号有任意值,在构建检索条件,否则不进行检索,这样动态的查询语句如果构建?
如可能会出现如下情况:
分类=90 and (名称 like '%测试%' or 编码 like '%123%')
分类=90 and (名称 like '%测试%')
分类=90
The document you expected this should be explained
Expected answer
Comment From: zsy619
使用gorm gen工具生成代码之后,如何构建