当isSelect传值为0时,值传不过来,解决方式去掉isSelect!=''".(不去掉的话,mybatis 会自动过滤掉isSelect=0这种情况) SELECT count(*) LEFT JOIN au_product ap ON (agc.spu_id = ap.product_id) <where> <if test="type!=null and type!=''"> and agc.type = #{type} </if> <if test="isSelect!=null"> and agc.is_select = #{isSelect} </if> </where>
mybatis 传值为0 无效
最新推荐文章于 2023-11-29 14:58:19 发布