<choose>
<when test="depts!=null and depts.size()!=0">
and dept_id in
<foreach collection="depts" open="(" close=")" separator="," item="dept">
#{dept}
</foreach>
</when>
<otherwise>
<if test="entity.schoolId!=null and entity.schoolId!=''">
and school_id=#{entity.schoolId,jdbcType=VARCHAR}
</if>
</otherwise>
</choose>
mybatis的if-else怎么写?
最新推荐文章于 2024-06-14 06:00:00 发布