public class OrderScenicBindParam implements Serializable { private Long orgId; private List<Long> parkList; public Long getOrgId() { return orgId; } public void setOrgId(Long orgId) { this.orgId = orgId; } public List<Long> getParkList() { return parkList; } public void setParkList(List<Long> parkList) { this.parkList = parkList; } }
<select id="selectScenicCodeByParkList" parameterType="cn.galasys.clota.ota.entity.OrderScenicBindParam" resultType="Long"> select distinct code from order_scenic_bind_rule where is_deleted = 'false' and status = 'true' and org_id = #{orgId} and ( <foreach collection="parkList" item="parkId" index="index" separator="or"> scenic_id like concat('%',#{parkId},'%') </foreach> ) </select>
参考:https://blog.csdn.net/qqqwwweeerasd/article/details/122990644
标签:xml,List,Long,id,orgId,foreach,使用,parkList,public From: https://www.cnblogs.com/jhdhl/p/17202998.html