min*_*nil 8 spring jdbctemplate
是否有可能通过Jdbc模板生成任意condtions SQL查询:
例:
如果我为1参数(仅名称)传递值:按名称搜索
"select * from address where shopname = ?";
Run Code Online (Sandbox Code Playgroud)
如果我为2参数(名称和城市)传递值 - 按店铺名称和城市搜索:
"select * from address where shopname = ? and city = ?";
Run Code Online (Sandbox Code Playgroud)
我有mupliple搜索字段.7个领域.如果用户输入任何组合.我只根据参数搜索.如何动态地将参数传递给sql.需要片段/示例如何实现这一点.
| 归档时间: |
|
| 查看次数: |
9846 次 |
| 最近记录: |