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