商品SKU功能优化

This commit is contained in:
macro
2020-02-29 16:35:39 +08:00
parent 765affaa27
commit a308c69968
19 changed files with 2629 additions and 3584 deletions

View File

@@ -74,9 +74,6 @@
oi.product_price item_product_price,
oi.product_quantity item_product_quantity,
oi.product_attr item_product_attr,
oi.sp1 item_sp1,
oi.sp2 item_sp2,
oi.sp3 item_sp3,
oh.id history_id,
oh.operate_man history_operate_man,
oh.create_time history_create_time,

View File

@@ -24,7 +24,7 @@
l.id ladder_id,l.product_id ladder_product_id,l.discount ladder_discount,l.count ladder_count,l.price ladder_price,
pf.id full_id,pf.product_id full_product_id,pf.full_price full_full_price,pf.reduce_price full_reduce_price,
m.id member_id,m.product_id member_product_id,m.member_level_id member_member_level_id,m.member_price member_member_price,m.member_level_name member_member_level_name,
s.id sku_id,s.product_id sku_product_id,s.price sku_price,s.low_stock sku_low_stock,s.pic sku_pic,s.sale sku_sale,s.sku_code sku_sku_code,s.sp1 sku_sp1,s.sp2 sku_sp2,s.sp3 sku_sp3,s.stock sku_stock,
s.id sku_id,s.product_id sku_product_id,s.price sku_price,s.low_stock sku_low_stock,s.pic sku_pic,s.sale sku_sale,s.sku_code sku_sku_code,s.stock sku_stock,s.sp_data sku_sp_data,
a.id attribute_id,a.product_id attribute_product_id,a.product_attribute_id attribute_product_attribute_id,a.value attribute_value
FROM pms_product p
LEFT JOIN pms_product_category pc on pc.id = p.product_category_id

View File

@@ -2,22 +2,20 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.macro.mall.dao.PmsSkuStockDao">
<insert id="insertList">
INSERT INTO pms_sku_stock (product_id, sku_code, price, stock, low_stock, sp1, sp2, sp3, pic, sale) VALUES
INSERT INTO pms_sku_stock (product_id, sku_code, price, stock, low_stock, pic, sale, sp_data) VALUES
<foreach collection="list" item="item" index="index" separator=",">
(#{item.productId,jdbcType=BIGINT},
#{item.skuCode,jdbcType=VARCHAR},
#{item.price,jdbcType=DECIMAL},
#{item.stock,jdbcType=INTEGER},
#{item.lowStock,jdbcType=INTEGER},
#{item.sp1,jdbcType=VARCHAR},
#{item.sp2,jdbcType=VARCHAR},
#{item.sp3,jdbcType=VARCHAR},
#{item.pic,jdbcType=VARCHAR},
#{item.sale,jdbcType=INTEGER})
#{item.sale,jdbcType=INTEGER},
#{item.spData,jdbcType=VARCHAR})
</foreach>
</insert>
<insert id="replaceList">
REPLACE INTO pms_sku_stock (id,product_id, sku_code, price, stock, low_stock, sp1, sp2, sp3, pic, sale) VALUES
REPLACE INTO pms_sku_stock (id,product_id, sku_code, price, stock, low_stock,pic, sale, sp_data) VALUES
<foreach collection="list" item="item" index="index" separator=",">
(#{item.id,jdbcType=BIGINT},
#{item.productId,jdbcType=BIGINT},
@@ -25,11 +23,9 @@
#{item.price,jdbcType=DECIMAL},
#{item.stock,jdbcType=INTEGER},
#{item.lowStock,jdbcType=INTEGER},
#{item.sp1,jdbcType=VARCHAR},
#{item.sp2,jdbcType=VARCHAR},
#{item.sp3,jdbcType=VARCHAR},
#{item.pic,jdbcType=VARCHAR},
#{item.sale,jdbcType=INTEGER})
#{item.sale,jdbcType=INTEGER},
#{item.spData,jdbcType=VARCHAR})
</foreach>
</insert>
</mapper>