dev798
parent
8296126d9f
commit
48e58bea7c
|
@ -51,4 +51,6 @@ public class ProductReq {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,10 +13,11 @@
|
||||||
method_type,t_product_brand.brand_name,t_product_type.type_name,sale_price,images_url,sales
|
method_type,t_product_brand.brand_name,t_product_type.type_name,sale_price,images_url,sales
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<insert id="insertProduct">
|
<insert id="insertProduct" useGeneratedKeys="true" keyProperty="id">
|
||||||
INSERT INTO `product`.`t_Product` (
|
INSERT INTO `t_Product` (
|
||||||
`product_name`,
|
`product_name`,
|
||||||
`product_number`,
|
`product_number`,
|
||||||
|
`category_id`,
|
||||||
`brand_id`,
|
`brand_id`,
|
||||||
`type_id`,
|
`type_id`,
|
||||||
`product_subheading`,
|
`product_subheading`,
|
||||||
|
@ -28,7 +29,7 @@
|
||||||
`product_growth`,
|
`product_growth`,
|
||||||
`product_max_points`,
|
`product_max_points`,
|
||||||
`product_foreknow`,
|
`product_foreknow`,
|
||||||
`product_staus`,
|
`product_status`,
|
||||||
`product_new`,
|
`product_new`,
|
||||||
`product_recommended`,
|
`product_recommended`,
|
||||||
`details_title`,
|
`details_title`,
|
||||||
|
@ -41,6 +42,7 @@
|
||||||
) VALUES (
|
) VALUES (
|
||||||
#{productName},
|
#{productName},
|
||||||
#{productNumber},
|
#{productNumber},
|
||||||
|
#{categoryId},
|
||||||
#{brandId},
|
#{brandId},
|
||||||
#{typeId},
|
#{typeId},
|
||||||
#{productSubheading},
|
#{productSubheading},
|
||||||
|
@ -62,11 +64,10 @@
|
||||||
#{methodType},
|
#{methodType},
|
||||||
#{createBy},
|
#{createBy},
|
||||||
NOW()
|
NOW()
|
||||||
);
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<update id="updateMothodId">
|
<update id="updateMothodId">
|
||||||
update t_product set method_id =#{methodId} where id = #{id}
|
update t_product set method_id =#{methodId} where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
@ -105,13 +106,12 @@
|
||||||
</where>
|
</where>
|
||||||
order by product_sort
|
order by product_sort
|
||||||
</select>
|
</select>
|
||||||
<select id="findProductNumber" resultType="java.lang.Integer">
|
|
||||||
|
|
||||||
|
<select id="findProductNumber" resultType="java.lang.Integer">
|
||||||
|
select count(id) from t_product where id_delete = 1 and product_number = #{productNumber}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<!-- 添加其他操作方法如插入、更新、删除等 -->
|
<!-- 添加其他操作方法如插入、更新、删除等 -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -9,9 +9,16 @@
|
||||||
<!-- 添加其他操作方法如插入、更新、删除等 -->
|
<!-- 添加其他操作方法如插入、更新、删除等 -->
|
||||||
|
|
||||||
<insert id="insertProductSku">
|
<insert id="insertProductSku">
|
||||||
|
insert t_product_sku (
|
||||||
insert t_product_sku (id,sale_price,promotion_price,stock,stock_alert
|
id,
|
||||||
,product_id,bg_img,create_time,create_by)
|
sale_price,
|
||||||
|
promotion_price,
|
||||||
|
stock,
|
||||||
|
stock_alert,
|
||||||
|
product_id,
|
||||||
|
bg_img,
|
||||||
|
create_time
|
||||||
|
)
|
||||||
values
|
values
|
||||||
<foreach collection="productSkus" item="productSku" separator=",">
|
<foreach collection="productSkus" item="productSku" separator=",">
|
||||||
(
|
(
|
||||||
|
@ -20,10 +27,9 @@
|
||||||
#{productSku.promotionPrice},
|
#{productSku.promotionPrice},
|
||||||
#{productSku.stock},
|
#{productSku.stock},
|
||||||
#{productSku.stockAlert},
|
#{productSku.stockAlert},
|
||||||
#{productSku.productId},
|
${id},
|
||||||
#{productSku.bgImg},
|
#{productSku.bgImg},
|
||||||
#{productSku.createTime},
|
now()
|
||||||
#{productSku.createBy}
|
|
||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
@ -45,12 +51,14 @@
|
||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="findSkuId" resultType="java.lang.Integer">
|
<select id="findSkuId" resultType="java.lang.Integer">
|
||||||
select count(id) from t_product_sku where id in
|
select count(id) from t_product_sku where id in
|
||||||
<foreach collection="productSkus" separator="," open="(" close=")" item="id">
|
<foreach collection="productSkus" separator="," open="(" close=")" item="id">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="querySku" resultType="com.muyu.product.domain.DTO.ProductSku">
|
<select id="querySku" resultType="com.muyu.product.domain.DTO.ProductSku">
|
||||||
select * from t_product_sku
|
select * from t_product_sku
|
||||||
</select>
|
</select>
|
||||||
|
|
Loading…
Reference in New Issue