mybatis查询参数为List<String>,输出结果为List<String>写法
<!-- 产线大屏,事件列表,根据流程实例ID查询已经撤销的流程--> <select id="getStopedProcessInstanceByIds" parameterType="java.util.List" resultType="string"> SELECT T1.PROC_INST_ID_ FROM `act_hi_procinst` as T1 join act_hi_comment as T2 on T1.PROC_INST_ID_=T2.PROC_INST_ID_ WHERE T2.TYPE_='Stop' <if test="processInstanceIds!=null"> and t1.PROC_INST_ID_ in <foreach collection="processInstanceIds" index="index" item="item" open="(" separator="," close=")"> #{item} </foreach> </if> ORDER BY T1.START_TIME_ DESC </select>
重点是parameterType为:java.util.List
resultType为:string