1. 批量插入、检索<foreach>
<insert id="insertSystemService" >insert into SYSTEMINFO_SERVICE (system_code, service_id, add_user, add_time)values<foreach collection="serviceList" item="serviceId" separator="," >( #{systemCode}, #{serviceId}, #{addUser},now()::timestamp(0))</foreach>
</insert>List<InfoBillOwn> selectByStates(List<String> states);
<select id="selectByStates" resultMap="BaseResultMap" parameterType="list">select STOP_OPEN_ID, ACC_NBR, SRV_CODE, STOP_BUSINESS_TYPE, STATE, STATE_DATE, FD_STATUSfrom INF_BILL_OWE where STATE in<foreach collection="list" open="(" close=")" separator="," item="state">#{state}</foreach>order by STOP_OPEN_ID asc
</select>