mybatis中if判断传入字符串或者Long参数不为空

private Long object_one;
private String object_two;
 
<if test="object_one !=null and object_one!=0">
	AND tc.creator_id=#{object_one}
</if>
<if test="object_two !=null and object_two !=''">
	 AND tc.`construction_time`=#{object_two}
</if>

 

你可能感兴趣的