首页 > 编程知识 正文

mybatis中iftest,判断stringbuffer是否为空

时间:2023-05-04 07:47:09 阅读:32445 作者:1228

mapper传递的参数为下图的list集合时

在mapper.xml中,使用if test判断该集合是否为空的写法如下。

if test='costsIds!=null and costsIds.size ()!=0' and standard _ costs _ idinforeachitem=' item ' collection=' costs ids ' separator=',' open='(' close=' )

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。