|
@@ -6,7 +6,6 @@
|
|
|
insert into product (
|
|
|
shopID, name, aliasName, commodityType, bigTypeID, smallTypeID, tinyTypeID, mainImage,
|
|
|
brandID, productType, tags, unit, normalPrice, price, includedTax, minBuyNumber, stock,
|
|
|
-
|
|
|
<if test="productCategory != null and productCategory != '' ">
|
|
|
productCategory,
|
|
|
</if>
|
|
@@ -76,6 +75,16 @@
|
|
|
<if test="invoiceType != null and invoiceType != ''">
|
|
|
invoiceType,
|
|
|
</if>
|
|
|
+ <if test="qualificationNo != null and qualificationNo != ''">
|
|
|
+ qualificationNo,
|
|
|
+ </if>
|
|
|
+ <if test="productName != null and productName != ''">
|
|
|
+ productName,
|
|
|
+ </if>
|
|
|
+ <if test="qualificationTime != null and qualificationTime != ''">
|
|
|
+ qualificationTime,
|
|
|
+ </if>
|
|
|
+
|
|
|
updateTime,validFlag,newProductType,showFlag
|
|
|
) values (
|
|
|
#{shopId}, #{name}, #{aliasName}, #{commodityType}, #{bigTypeId}, #{smallTypeId}, #{tinyTypeId}, #{mainImage},
|
|
@@ -150,6 +159,15 @@
|
|
|
<if test="invoiceType != null and invoiceType != ''">
|
|
|
#{invoiceType},
|
|
|
</if>
|
|
|
+ <if test="qualificationNo != null and qualificationNo != ''">
|
|
|
+ #{qualificationNo},
|
|
|
+ </if>
|
|
|
+ <if test="productName != null and productName != ''">
|
|
|
+ #{productName},
|
|
|
+ </if>
|
|
|
+ <if test="qualificationTime != null and qualificationTime != ''">
|
|
|
+ #{qualificationTime},
|
|
|
+ </if>
|
|
|
#{updateTime}, #{validFlag},#{newProductType},#{showFlag}
|
|
|
)
|
|
|
</insert>
|
|
@@ -157,9 +175,24 @@
|
|
|
update product set
|
|
|
shopID = #{shopId}, name = #{name}, aliasName = #{aliasName}, commodityType = #{commodityType},
|
|
|
bigTypeId = #{bigTypeId}, smallTypeId = #{smallTypeId}, tinyTypeId = #{tinyTypeId}, mainImage = #{mainImage},
|
|
|
- brandId = #{brandId}, productType = #{productType}, tags = #{tags}, unit = #{unit}, normalPrice = #{normalPrice},
|
|
|
- price = #{price}, price = #{price}, includedTax = #{includedTax}, minBuyNumber = #{minBuyNumber}, stock =#{stock},
|
|
|
+ brandId = #{brandId}, productType = #{productType}, tags = #{tags}, unit = #{unit}, normalPrice =
|
|
|
+ #{normalPrice},
|
|
|
+ price = #{price}, price = #{price}, includedTax = #{includedTax}, minBuyNumber = #{minBuyNumber}, stock
|
|
|
+ =#{stock},
|
|
|
newProductType=#{newProductType},
|
|
|
+ <if test="qualificationNo !=null and qualificationNo != ''">
|
|
|
+ qualificationNo=#{qualificationNo},
|
|
|
+ </if>
|
|
|
+ <if test="productName !=null and productName != ''">
|
|
|
+ productName=#{productName},
|
|
|
+ </if>
|
|
|
+ <if test="qualificationTime !=null and qualificationTime != ''">
|
|
|
+ qualificationTime=#{qualificationTime},
|
|
|
+ </if>
|
|
|
+ <if test="qualificationLink !=null and qualificationLink != ''">
|
|
|
+ qualificationLink=#{qualificationLink},
|
|
|
+ </if>
|
|
|
+
|
|
|
<if test="productCategory != null and productCategory != ''">
|
|
|
productCategory = #{productCategory},
|
|
|
</if>
|
|
@@ -470,20 +503,20 @@
|
|
|
order by mainFlag DESC
|
|
|
</select>
|
|
|
<select id="getProductForm" resultType="com.caimei365.commodity.model.vo.ProductFormVo">
|
|
|
- select productID as productId,
|
|
|
- shopID as shopId,
|
|
|
+ select productID as productId,
|
|
|
+ shopID as shopId,
|
|
|
name,
|
|
|
aliasName,
|
|
|
commodityType,
|
|
|
mainImage,
|
|
|
stock,
|
|
|
invoiceType,
|
|
|
- bigTypeID as bigTypeId,
|
|
|
- smallTypeID as smallTypeId,
|
|
|
- tinyTypeID as tinyTypeId,
|
|
|
+ bigTypeID as bigTypeId,
|
|
|
+ smallTypeID as smallTypeId,
|
|
|
+ tinyTypeID as tinyTypeId,
|
|
|
searchKey,
|
|
|
visibility,
|
|
|
- brandID as brandId,
|
|
|
+ brandID as brandId,
|
|
|
productType,
|
|
|
tags,
|
|
|
unit,
|
|
@@ -517,7 +550,11 @@
|
|
|
trainingMethod,
|
|
|
trainingType,
|
|
|
trainingFee,
|
|
|
- ifnull(newProductType,2) as newProductType
|
|
|
+ ifnull(newProductType, 2) as newProductType,
|
|
|
+ qualificationNo as qualificationNo,
|
|
|
+ productName as productName,
|
|
|
+ qualificationTime as qualificationTime,
|
|
|
+ qualificationLink as qualificationLink
|
|
|
from product
|
|
|
where productID = #{productId}
|
|
|
</select>
|