示例:
1、常规使用
select * from table where table_field = ${参数名称} ( 或 #{参数名称} )
2、条件判断
select * from table where 1=1 <if test="参数名称 != null and 参数名称 !=''"> and table_field = ${参数名称} </if>
示例:
1、常规使用 select * from table where table_field = ${参数名称}
2、标签使用
select * from table where 1=1 <参数名称> and table_field = ${参数名称} </参数名称>