MyBatis中的if(){}else{}方法
<choose>
<when test="list != null and list.size() > 0">
and up.project_list_id in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item.projectListId}
</foreach>
</when>
<otherwise>
and up.project_list_id = 0
</otherwise>
</choose>