- 使用@Select注解
- 使用<script></script>標(biāo)簽
- 參數(shù)要帶@Param("XXX")
@Select("<script>"
+"select * from tb_taobao where 1=1"
+"<if test='status != null'>"
+"and status = #{status}"
+"</if>"
+"</script>")
public List<Taobao> getTaobaoList(@Param("status") Integer status);