|
|
@ -8,6 +8,7 @@
|
|
|
|
<id property="purchaseOrderItemId" column="purchase_order_item_id" jdbcType="BIGINT"/>
|
|
|
|
<id property="purchaseOrderItemId" column="purchase_order_item_id" jdbcType="BIGINT"/>
|
|
|
|
<result property="purchaseOrderId" column="purchase_order_id" jdbcType="BIGINT"/>
|
|
|
|
<result property="purchaseOrderId" column="purchase_order_id" jdbcType="BIGINT"/>
|
|
|
|
<result property="purOrderId" column="pur_order_id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="purOrderId" column="pur_order_id" jdbcType="VARCHAR"/>
|
|
|
|
|
|
|
|
<result property="subItemId" column="sub_item_id" jdbcType="VARCHAR"/>
|
|
|
|
<result property="orderId" column="order_id" jdbcType="BIGINT"/>
|
|
|
|
<result property="orderId" column="order_id" jdbcType="BIGINT"/>
|
|
|
|
<result property="wareId" column="ware_id" jdbcType="BIGINT"/>
|
|
|
|
<result property="wareId" column="ware_id" jdbcType="BIGINT"/>
|
|
|
|
<result property="skuId" column="sku_id" jdbcType="BIGINT"/>
|
|
|
|
<result property="skuId" column="sku_id" jdbcType="BIGINT"/>
|
|
|
@ -21,7 +22,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
purchase_order_item_id,purchase_order_id,pur_order_id,
|
|
|
|
purchase_order_item_id,purchase_order_id,pur_order_id,
|
|
|
|
order_id,ware_id,sku_id,
|
|
|
|
sub_item_id,order_id,ware_id,sku_id,
|
|
|
|
purchase_url,purchase_price,purchase_num,
|
|
|
|
purchase_url,purchase_price,purchase_num,
|
|
|
|
status,gmt_create,gmt_modified
|
|
|
|
status,gmt_create,gmt_modified
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
@ -32,6 +33,12 @@
|
|
|
|
from purchase_order_item
|
|
|
|
from purchase_order_item
|
|
|
|
where purchase_order_item_id = #{purchaseOrderItemId,jdbcType=BIGINT}
|
|
|
|
where purchase_order_item_id = #{purchaseOrderItemId,jdbcType=BIGINT}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getListByPurchaseOrderId" resultType="com.ms.dal.entity.PurchaseOrderItem">
|
|
|
|
|
|
|
|
select
|
|
|
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
|
|
|
from purchase_order_item
|
|
|
|
|
|
|
|
where purchase_order_id = #{purchaseOrderId,jdbcType=BIGINT}
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
|
delete from purchase_order_item
|
|
|
|
delete from purchase_order_item
|
|
|
@ -40,12 +47,12 @@
|
|
|
|
<insert id="insert" keyColumn="purchase_order_item_id" keyProperty="purchaseOrderItemId" parameterType="com.ms.dal.entity.PurchaseOrderItem" useGeneratedKeys="true">
|
|
|
|
<insert id="insert" keyColumn="purchase_order_item_id" keyProperty="purchaseOrderItemId" parameterType="com.ms.dal.entity.PurchaseOrderItem" useGeneratedKeys="true">
|
|
|
|
insert into purchase_order_item
|
|
|
|
insert into purchase_order_item
|
|
|
|
( purchase_order_item_id,purchase_order_id,pur_order_id
|
|
|
|
( purchase_order_item_id,purchase_order_id,pur_order_id
|
|
|
|
,order_id,ware_id,sku_id
|
|
|
|
,sub_item_id,order_id,ware_id,sku_id
|
|
|
|
,purchase_url,purchase_price,purchase_num
|
|
|
|
,purchase_url,purchase_price,purchase_num
|
|
|
|
,status,gmt_create,gmt_modified
|
|
|
|
,status,gmt_create,gmt_modified
|
|
|
|
)
|
|
|
|
)
|
|
|
|
values (#{purchaseOrderItemId,jdbcType=BIGINT},#{purchaseOrderId,jdbcType=BIGINT},#{purOrderId,jdbcType=VARCHAR}
|
|
|
|
values (#{purchaseOrderItemId,jdbcType=BIGINT},#{purchaseOrderId,jdbcType=BIGINT},#{purOrderId,jdbcType=VARCHAR}
|
|
|
|
,#{orderId,jdbcType=BIGINT},#{wareId,jdbcType=BIGINT},#{skuId,jdbcType=BIGINT}
|
|
|
|
,#{subItemId,jdbcType=VARCHAR},#{orderId,jdbcType=BIGINT},#{wareId,jdbcType=BIGINT},#{skuId,jdbcType=BIGINT}
|
|
|
|
,#{purchaseUrl,jdbcType=VARCHAR},#{purchasePrice,jdbcType=DECIMAL},#{purchaseNum,jdbcType=SMALLINT}
|
|
|
|
,#{purchaseUrl,jdbcType=VARCHAR},#{purchasePrice,jdbcType=DECIMAL},#{purchaseNum,jdbcType=SMALLINT}
|
|
|
|
,#{status,jdbcType=VARCHAR},#{gmtCreate,jdbcType=TIMESTAMP},#{gmtModified,jdbcType=TIMESTAMP}
|
|
|
|
,#{status,jdbcType=VARCHAR},#{gmtCreate,jdbcType=TIMESTAMP},#{gmtModified,jdbcType=TIMESTAMP}
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -57,6 +64,7 @@
|
|
|
|
<if test="purchaseOrderItemId != null">purchase_order_item_id,</if>
|
|
|
|
<if test="purchaseOrderItemId != null">purchase_order_item_id,</if>
|
|
|
|
<if test="purchaseOrderId != null">purchase_order_id,</if>
|
|
|
|
<if test="purchaseOrderId != null">purchase_order_id,</if>
|
|
|
|
<if test="purOrderId != null">pur_order_id,</if>
|
|
|
|
<if test="purOrderId != null">pur_order_id,</if>
|
|
|
|
|
|
|
|
<if test="subItemId != null">sub_item_id,</if>
|
|
|
|
<if test="orderId != null">order_id,</if>
|
|
|
|
<if test="orderId != null">order_id,</if>
|
|
|
|
<if test="wareId != null">ware_id,</if>
|
|
|
|
<if test="wareId != null">ware_id,</if>
|
|
|
|
<if test="skuId != null">sku_id,</if>
|
|
|
|
<if test="skuId != null">sku_id,</if>
|
|
|
@ -71,6 +79,7 @@
|
|
|
|
<if test="purchaseOrderItemId != null">#{purchaseOrderItemId,jdbcType=BIGINT},</if>
|
|
|
|
<if test="purchaseOrderItemId != null">#{purchaseOrderItemId,jdbcType=BIGINT},</if>
|
|
|
|
<if test="purchaseOrderId != null">#{purchaseOrderId,jdbcType=BIGINT},</if>
|
|
|
|
<if test="purchaseOrderId != null">#{purchaseOrderId,jdbcType=BIGINT},</if>
|
|
|
|
<if test="purOrderId != null">#{purOrderId,jdbcType=VARCHAR},</if>
|
|
|
|
<if test="purOrderId != null">#{purOrderId,jdbcType=VARCHAR},</if>
|
|
|
|
|
|
|
|
<if test="subItemId != null">#{subItemId,jdbcType=VARCHAR},</if>
|
|
|
|
<if test="orderId != null">#{orderId,jdbcType=BIGINT},</if>
|
|
|
|
<if test="orderId != null">#{orderId,jdbcType=BIGINT},</if>
|
|
|
|
<if test="wareId != null">#{wareId,jdbcType=BIGINT},</if>
|
|
|
|
<if test="wareId != null">#{wareId,jdbcType=BIGINT},</if>
|
|
|
|
<if test="skuId != null">#{skuId,jdbcType=BIGINT},</if>
|
|
|
|
<if test="skuId != null">#{skuId,jdbcType=BIGINT},</if>
|
|
|
@ -89,6 +98,9 @@
|
|
|
|
<if test="purOrderId != null">
|
|
|
|
<if test="purOrderId != null">
|
|
|
|
pur_order_id = #{purOrderId,jdbcType=VARCHAR},
|
|
|
|
pur_order_id = #{purOrderId,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="subItemId != null">
|
|
|
|
|
|
|
|
sub_item_id = #{subItemId,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="orderId != null">
|
|
|
|
<if test="orderId != null">
|
|
|
|
order_id = #{orderId,jdbcType=BIGINT},
|
|
|
|
order_id = #{orderId,jdbcType=BIGINT},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
@ -124,6 +136,7 @@
|
|
|
|
<if test="purchaseOrderItemId != null">purchase_order_item_id,</if>
|
|
|
|
<if test="purchaseOrderItemId != null">purchase_order_item_id,</if>
|
|
|
|
<if test="purchaseOrderId != null">purchase_order_id,</if>
|
|
|
|
<if test="purchaseOrderId != null">purchase_order_id,</if>
|
|
|
|
<if test="purOrderId != null">pur_order_id,</if>
|
|
|
|
<if test="purOrderId != null">pur_order_id,</if>
|
|
|
|
|
|
|
|
<if test="subItemId != null">sub_item_id,</if>
|
|
|
|
<if test="orderId != null">order_id,</if>
|
|
|
|
<if test="orderId != null">order_id,</if>
|
|
|
|
<if test="wareId != null">ware_id,</if>
|
|
|
|
<if test="wareId != null">ware_id,</if>
|
|
|
|
<if test="skuId != null">sku_id,</if>
|
|
|
|
<if test="skuId != null">sku_id,</if>
|
|
|
@ -138,6 +151,7 @@
|
|
|
|
<if test="purchaseOrderItemId != null">#{purchaseOrderItemId,jdbcType=BIGINT},</if>
|
|
|
|
<if test="purchaseOrderItemId != null">#{purchaseOrderItemId,jdbcType=BIGINT},</if>
|
|
|
|
<if test="purchaseOrderId != null">#{purchaseOrderId,jdbcType=BIGINT},</if>
|
|
|
|
<if test="purchaseOrderId != null">#{purchaseOrderId,jdbcType=BIGINT},</if>
|
|
|
|
<if test="purOrderId != null">#{purOrderId,jdbcType=VARCHAR},</if>
|
|
|
|
<if test="purOrderId != null">#{purOrderId,jdbcType=VARCHAR},</if>
|
|
|
|
|
|
|
|
<if test="subItemId != null">#{subItemId,jdbcType=VARCHAR},</if>
|
|
|
|
<if test="orderId != null">#{orderId,jdbcType=BIGINT},</if>
|
|
|
|
<if test="orderId != null">#{orderId,jdbcType=BIGINT},</if>
|
|
|
|
<if test="wareId != null">#{wareId,jdbcType=BIGINT},</if>
|
|
|
|
<if test="wareId != null">#{wareId,jdbcType=BIGINT},</if>
|
|
|
|
<if test="skuId != null">#{skuId,jdbcType=BIGINT},</if>
|
|
|
|
<if test="skuId != null">#{skuId,jdbcType=BIGINT},</if>
|
|
|
@ -158,6 +172,9 @@
|
|
|
|
<if test="purOrderId != null">
|
|
|
|
<if test="purOrderId != null">
|
|
|
|
pur_order_id = #{purOrderId,jdbcType=VARCHAR},
|
|
|
|
pur_order_id = #{purOrderId,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="subItemId != null">
|
|
|
|
|
|
|
|
sub_item_id = #{subItemId,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="orderId != null">
|
|
|
|
<if test="orderId != null">
|
|
|
|
order_id = #{orderId,jdbcType=BIGINT},
|
|
|
|
order_id = #{orderId,jdbcType=BIGINT},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
@ -193,6 +210,7 @@
|
|
|
|
set
|
|
|
|
set
|
|
|
|
purchase_order_id = #{purchaseOrderId,jdbcType=BIGINT},
|
|
|
|
purchase_order_id = #{purchaseOrderId,jdbcType=BIGINT},
|
|
|
|
pur_order_id = #{purOrderId,jdbcType=VARCHAR},
|
|
|
|
pur_order_id = #{purOrderId,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
sub_item_id = #{subItemId,jdbcType=VARCHAR},
|
|
|
|
order_id = #{orderId,jdbcType=BIGINT},
|
|
|
|
order_id = #{orderId,jdbcType=BIGINT},
|
|
|
|
ware_id = #{wareId,jdbcType=BIGINT},
|
|
|
|
ware_id = #{wareId,jdbcType=BIGINT},
|
|
|
|
sku_id = #{skuId,jdbcType=BIGINT},
|
|
|
|
sku_id = #{skuId,jdbcType=BIGINT},
|
|
|
@ -206,13 +224,13 @@
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
<insert id="insertBatch" keyColumn="purchase_order_item_id" keyProperty="purchaseOrderItemId" useGeneratedKeys="true">
|
|
|
|
<insert id="insertBatch" keyColumn="purchase_order_item_id" keyProperty="purchaseOrderItemId" useGeneratedKeys="true">
|
|
|
|
insert into purchase_order_item
|
|
|
|
insert into purchase_order_item
|
|
|
|
(purchase_order_item_id,purchase_order_id,order_id
|
|
|
|
(purchase_order_item_id,purchase_order_id,sub_item_id
|
|
|
|
,pur_order_id,ware_id,sku_id,purchase_url
|
|
|
|
,order_id,pur_order_id,ware_id,sku_id,purchase_url
|
|
|
|
,purchase_price,purchase_num,status
|
|
|
|
,purchase_price,purchase_num,status
|
|
|
|
,gmt_create,gmt_modified)
|
|
|
|
,gmt_create,gmt_modified)
|
|
|
|
values
|
|
|
|
values
|
|
|
|
<foreach item="item" collection="list" separator="," >
|
|
|
|
<foreach item="item" collection="list" separator="," >
|
|
|
|
(#{item.purchaseOrderItemId,jdbcType=BIGINT},#{item.purchaseOrderId,jdbcType=BIGINT},#{item.orderId,jdbcType=BIGINT}
|
|
|
|
(#{item.purchaseOrderItemId,jdbcType=BIGINT},#{item.purchaseOrderId,jdbcType=BIGINT},#{item.subItemId,jdbcType=VARCHAR},#{item.orderId,jdbcType=BIGINT}
|
|
|
|
,#{item.purOrderId,jdbcType=VARCHAR},#{item.wareId,jdbcType=BIGINT},#{item.skuId,jdbcType=BIGINT},#{item.purchaseUrl,jdbcType=VARCHAR}
|
|
|
|
,#{item.purOrderId,jdbcType=VARCHAR},#{item.wareId,jdbcType=BIGINT},#{item.skuId,jdbcType=BIGINT},#{item.purchaseUrl,jdbcType=VARCHAR}
|
|
|
|
,#{item.purchasePrice,jdbcType=DECIMAL},#{item.purchaseNum,jdbcType=SMALLINT},#{item.status,jdbcType=VARCHAR}
|
|
|
|
,#{item.purchasePrice,jdbcType=DECIMAL},#{item.purchaseNum,jdbcType=SMALLINT},#{item.status,jdbcType=VARCHAR}
|
|
|
|
,#{item.gmtCreate,jdbcType=TIMESTAMP},#{item.gmtModified,jdbcType=TIMESTAMP})
|
|
|
|
,#{item.gmtCreate,jdbcType=TIMESTAMP},#{item.gmtModified,jdbcType=TIMESTAMP})
|
|
|
|