天天看點

Oracle 批量查詢 傳入List 傳回List

直接上代碼

  • Dao層
  • Mapper接口
<select id="selectBrachNo" resultType="com.bootdo.system.domain.DataMastDO">
		select * from ORW_DATA_MAST
		where
		 <foreach collection="mastDos" index="index" item="val" separator="or" open="(" close=")">
			 (orw_modelid = #{val.orwModelid} and orw_seqno=#{val.orwSeqno})
		 </foreach>

	</select>
           
注意:Dao中的 @Param(“mastDos”) 不寫會抛異常,找不到 mastDos這個屬性 其他注釋明天研究下