mybatis里查询条件 IN 的用法

<select id="selectProcessOwnerProjectId" resultMap="BaseResultMap">
    SELECT DISTINCT
    P.ID,
    P.OWNER_PROJECT,
    P.PROCESS_NAME
    FROM
    model_repository_manage M,
    process_specification P
    WHERE
    M.PROCESS_ID = P.ID
    AND p.ID IN
    <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
        #{item}
    foreach> 
select>
List<Long> listParam = new ArrayList<>();

你可能感兴趣的:(mybatis里查询条件 IN 的用法)