<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzs.scm.pub.mapper.ScmItemSpecsMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="ScmItemSpecs" type="com.hzs.common.domain.scm.pub.ScmItemSpecs">
        <id column="PK_ID" property="pkId" />
        <result column="CREATION_TIME" property="creationTime" />
        <result column="MODIFIED_TIME" property="modifiedTime" />
        <result column="DEL_FLAG" property="delFlag" />
        <result column="PK_COUNTRY" property="pkCountry" />
        <result column="PK_CREATOR" property="pkCreator" />
        <result column="PK_MODIFIED" property="pkModified" />
        <result column="ORDER_TYPE" property="orderType" />
        <result column="PK_ORDER" property="pkOrder" />
        <result column="PK_ORDER_ITEMS" property="pkOrderItems" />
        <result column="PK_SPECS_TYPE" property="pkSpecsType" />
        <result column="PK_SPECS" property="pkSpecs" />
        <result column="SPECS_NAME" property="specsName" />
    </resultMap>
    <select id="queryScmItemSpecsByCondition" resultType="com.hzs.common.domain.scm.pub.ScmItemSpecs">
        <foreach collection="scmItemSpecsList" item="item" index="index" separator=" union ">
            select * from scm_item_specs
            where del_flag=0 and order_type=#{orderType} and pk_order = #{item.pkOrder}
              and pk_order_items= #{item.pkOrderItems}
        </foreach>
    </select>


</mapper>
