【六袆-Java】mybatis 查询时传入参数为0被误认为是null,且会被忽略 ;处理bug

it2025-08-28  4

mybatis 查询时传入参数为0被误认为是null

所以SQL改进:

"<if test=\"status!=null and status !='' or status==0\">\n" " and `status` = #{status}\n" + "</if>\n"

 

 

最新回复(0)