|  |  | 
 |  |  |           #{item} | 
 |  |  |         </foreach> | 
 |  |  |    </select> | 
 |  |  |    <select id="selectList" resultType="com.ruoyi.project.system.domain.SysUser"> | 
 |  |  |       SELECT user_id, nick_name FROM sys_user | 
 |  |  |       <where> | 
 |  |  |          <if test="list != null and list.size() > 0"> | 
 |  |  |             user_id IN | 
 |  |  |             <foreach item="id" collection="list" open="(" separator="," close=")"> | 
 |  |  |                #{id} | 
 |  |  |             </foreach> | 
 |  |  |          </if> | 
 |  |  |          <if test="list == null or list.size() == 0"> | 
 |  |  |             1=0  <!-- 空列表时返回空结果 --> | 
 |  |  |          </if> | 
 |  |  |       </where> | 
 |  |  |    </select> | 
 |  |  |    <select id="selectUsersByIds" resultType="com.ruoyi.project.system.domain.SysUser"> | 
 |  |  |       SELECT user_id, nick_name | 
 |  |  |       FROM sys_user | 
 |  |  |       WHERE user_id IN | 
 |  |  |       <foreach collection="userIds" item="id" open="(" separator="," close=")"> | 
 |  |  |          #{id} | 
 |  |  |       </foreach> | 
 |  |  |    </select> | 
 |  |  |  | 
 |  |  |    <insert id="insertUser" parameterType="com.ruoyi.project.system.domain.SysUser" useGeneratedKeys="true" keyProperty="userId"> | 
 |  |  |        insert into sys_user( |