mybatis-plus自定义sql

2022-05-10  本文已影响0人  进击的小鹿
@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);

上一篇 下一篇

猜你喜欢

热点阅读