XML语句
<select id="findInBillCotainerByCode" resultMap="BaseResultMap"
parameterType="com.dream.biz.model.dto.store.pda.SotreInBillParameterDTO">
select
<include refid="Base_Column_List" />
from t_store_in_detail d
inner join t_store_in_container c
on d.id = c.in_bill_detail_id
<where>
<if test="inBillIdArr != null">
and d.in_bill_id in
<foreach collection="inBillIdArr" index="index" item="item"
open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="statusArr != null">
and c.status in
<foreach collection="statusArr" index="index" item="status"
open="(" separator="," close=")">
#{status}
</foreach>
</if>
</where>
</select>
java 类文件
SotreInBillParameterDTO paramDTO = new SotreInBillParameterDTO();
paramDTO.setInBillIdArr(new Long[] { inBillEx.getId() });
paramDTO.setStatusArr(new String[] { boxStatus.NOTRECEIVING, boxStatus.PARTIALRECEIVED,boxStatus.COLLECTED });
// 收货单内箱信息
List<InBillContainerEx> containerExList = containerExMapper.findInBillCotainerByCode(paramDTO);