src/main/resources/mapper/basic/ProductModelMapper.xml
@@ -140,5 +140,18 @@ left join product p on p.id = pm.product_id order by p.id,pm.id desc </select> <select id="selectModelByIds" resultType="com.ruoyi.basic.dto.ProductModelDto"> select pm.model,p.product_name,pm.unit from product_model pm left join product p on pm.product_id = p.id <where> <if test="list != null and list.size() > 0"> and pm.id in <foreach item="item" collection="list" separator="," open="(" close=")" index="index"> #{item} </foreach> </if> </where> </select> </mapper>