ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

mybatis

2022-02-24 18:01:51  阅读:63  来源: 互联网

标签:loc level deleted list eb mybatis


判断list是否为空

<where>
            <if test="CodeList!=null and CodeList.size > 0">
                loc.eb_code in
                <foreach collection="locationCodeList" item="Code" open="(" separator="," close=")">
                    #{Code}
                </foreach>
            </if>
            <if test="queryVo.level != null  ">
                and loc.eb_level = #{queryVo.level}
            </if>
            and arg.is_deleted = 0
        </where>

 mybatis 写<where> 可以判断是否是第一个条件,不用写where 1=1 

标签:loc,level,deleted,list,eb,mybatis
来源: https://www.cnblogs.com/jingRegina/p/15932889.html

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有