| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.InsProductResultMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.InsProductResult"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="insProductId" column="ins_product_id" jdbcType="INTEGER"/> |
| | | <result property="insValue" column="ins_value" jdbcType="VARCHAR"/> |
| | | <result property="comValue" column="com_value" jdbcType="VARCHAR"/> |
| | | <result property="equipValue" column="equip_value" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="insProductId" column="ins_product_id" jdbcType="INTEGER"/> |
| | | <result property="insValue" column="ins_value" jdbcType="VARCHAR"/> |
| | | <result property="comValue" column="com_value" jdbcType="VARCHAR"/> |
| | | <result property="equipValue" column="equip_value" jdbcType="VARCHAR"/> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | <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> |