inspect-server/src/main/resources/mapper/InsProductResultMapper.xml
@@ -15,17 +15,5 @@ <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> </resultMap> <select id="selDetail" resultMap="BaseResultMap"> select * from ins_product_result where 1=1 <!--and ins_product_id in (#{ips})--> <if test="ips != null and ips.size() > 0"> <!-- 使用foreach元素构建IN子句 --> and ins_product_id in <foreach item="item" collection="ips" open="(" separator="," close=")"> #{item} </foreach> </if> </select> </mapper>