分割逗号成list查询

2020-12-25  本文已影响0人  flyjar
<select id="getUserListByUsernames" parameterType="java.lang.String"  resultType="org.jeecg.modules.system.entity.SysUser">
        select * from  sys_user  where username in
        <foreach item="item" index="index" collection="usernames.split(',')"  open="(" separator="," close=")">
            '${item}'
        </foreach>
         and del_flag = '0'
    </select>
上一篇下一篇

猜你喜欢

热点阅读