提交 56f7a706 作者: xiaowang

返回产品id

上级 be531dd6
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<insert id="insertProductSpec" keyProperty="id" useGeneratedKeys="true" <insert id="insertProductSpec" keyProperty="id" useGeneratedKeys="true"
parameterType="com.mmc.pms.entity.ProductSpecDO"> parameterType="com.mmc.pms.entity.ProductSpecDO">
insert into product_spec (product_id, spec_name, spec_image, part_no, version_desc) insert into product_spec (product_id, spec_name, spec_image, part_no, version_desc)
values (#{productSkuId}, #{specName}, #{specImage}, #{partNo}, #{versionDesc}) values (#{productId}, #{specName}, #{specImage}, #{partNo}, #{versionDesc})
</insert> </insert>
<insert id="batchInsertSpecPrice" useGeneratedKeys="true" <insert id="batchInsertSpecPrice" useGeneratedKeys="true"
keyProperty="id" parameterType="com.mmc.pms.entity.ProductSpecPriceDO"> keyProperty="id" parameterType="com.mmc.pms.entity.ProductSpecPriceDO">
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
spec_image = #{specImage}, spec_image = #{specImage},
part_no = #{partNo}, part_no = #{partNo},
version_desc = #{versionDesc}, version_desc = #{versionDesc},
product_id = #{productSkuId} product_id = #{productId}
where id = #{id} where id = #{id}
</update> </update>
<update id="removeProductSku"> <update id="removeProductSku">
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
</select> </select>
<select id="countSpecName" resultType="java.lang.Integer"> <select id="countSpecName" resultType="java.lang.Integer">
select count(*) from product_spec select count(*) from product_spec
where spec_name = #{specName} and is_deleted = 0 and product_id = #{productSkuId} where spec_name = #{specName} and is_deleted = 0 and product_id = #{productId}
<if test="id !=null and id !=''"> <if test="id !=null and id !=''">
and id <![CDATA[<>]]> #{id} and id <![CDATA[<>]]> #{id}
</if> </if>
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
</select> </select>
<select id="getProductSpecDetail" resultType="com.mmc.pms.entity.ProductSpecDO"> <select id="getProductSpecDetail" resultType="com.mmc.pms.entity.ProductSpecDO">
select id, select id,
product_id productSkuId, product_id productId,
spec_name specName, spec_name specName,
spec_image specImage, spec_image specImage,
part_no partNo, part_no partNo,
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
</select> </select>
<select id="listPageProductSpec" resultType="com.mmc.pms.entity.ProductSpecDO"> <select id="listPageProductSpec" resultType="com.mmc.pms.entity.ProductSpecDO">
select id, select id,
product_id productSkuId, product_id productId,
spec_name specName, spec_name specName,
spec_image specImage, spec_image specImage,
part_no partNo, part_no partNo,
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
from product_spec from product_spec
<where> <where>
is_deleted = 0 is_deleted = 0
and product_id = #{productSkuId} and product_id = #{productId}
<if test="keyword != null and keyword != ''"> <if test="keyword != null and keyword != ''">
and spec_name like CONCAT('%',#{keyword},'%') and spec_name like CONCAT('%',#{keyword},'%')
</if> </if>
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
</select> </select>
<select id="listProductSpec" resultType="com.mmc.pms.entity.ProductSpecDO"> <select id="listProductSpec" resultType="com.mmc.pms.entity.ProductSpecDO">
select id, select id,
product_id productSkuId, product_id productId,
spec_name, spec_name,
spec_image, spec_image,
part_no, part_no,
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
create_time create_time
from product_spec from product_spec
where is_deleted = 0 where is_deleted = 0
and product_id = #{productSkuId} and product_id = #{productId}
</select> </select>
<select id="listProductSkuDO" resultType="com.mmc.pms.entity.ProductDO"> <select id="listProductSkuDO" resultType="com.mmc.pms.entity.ProductDO">
SELECT ps.id, SELECT ps.id,
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
id, id,
industry_product_inventory_id industryProductInventoryId, industry_product_inventory_id industryProductInventoryId,
product_spec_id productSpecId, product_spec_id productSpecId,
product_id productSkuId product_id productId
FROM FROM
inventory_spec inventory_spec
WHERE WHERE
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
<select id="listProductSpecInfo" resultType="com.mmc.pms.entity.ProductSpecDO"> <select id="listProductSpecInfo" resultType="com.mmc.pms.entity.ProductSpecDO">
SELECT SELECT
id, id,
product_id productSkuId, product_id productId,
spec_name specName, spec_name specName,
spec_image specImage, spec_image specImage,
part_no partNo, part_no partNo,
...@@ -369,7 +369,7 @@ ...@@ -369,7 +369,7 @@
<select id="getProductSpecList" resultType="com.mmc.pms.entity.ProductSpecDO"> <select id="getProductSpecList" resultType="com.mmc.pms.entity.ProductSpecDO">
SELECT SELECT
id, id,
product_id productSkuId, product_id productId,
spec_name specName, spec_name specName,
spec_image specImage, spec_image specImage,
part_no partNo, part_no partNo,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论