<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.njcn.product.event.transientes.mapper.PqUserLedgerMapper">

  <select id="getUserByParam" resultType="PqUserLineAssPO">
    select distinct b.line_index,a.CUSTOMER_NAME userName
    from pq_user_ledger a inner join PQ_USER_LINE_ASS b on a.id = b.user_index
    where b.line_index in
    <foreach collection="lineIds" open="(" close=")" separator="," item="item">
      #{item}
    </foreach>
    <if test="searchValue!=null and searchValue!=''">
      and a.CUSTOMER_NAME  LIKE '%' || #{searchValue} || '%'
    </if>
  </select>

</mapper>
