http://blog.csdn.net/yanggaosheng/article/details/46685565
<select id="queryEmp" resultType="cn.test.entity.Emp">
select * from emp where 1=1
<if test="deptNo!=null">
and deptno=#{deptNO}
</if>
<if test="deptName!=null">
and deptno=#{deptName}
</if>
</select>
原文地址:https://www.cnblogs.com/2016-cxp/p/8654727.html
时间: 2024-11-02 00:37:10