|
@@ -76,11 +76,38 @@
|
|
|
<if test="invoiceType != null and invoiceType != ''">
|
|
|
invoiceType,
|
|
|
</if>
|
|
|
- updateTime,validFlag,newProductType,showFlag
|
|
|
+ <if test="qualificationNo != null and qualificationNo != ''">
|
|
|
+ qualificationNo,
|
|
|
+ </if>
|
|
|
+ <if test="productName != null and productName != ''">
|
|
|
+ productName,
|
|
|
+ </if>
|
|
|
+ <if test="qualificationTime != null and qualificationTime != ''">
|
|
|
+ qualificationTime,
|
|
|
+ </if>
|
|
|
+ <if test="qualificationLink != null and qualificationLink != ''">
|
|
|
+ qualificationLink,
|
|
|
+ </if>
|
|
|
+ updateTime,validFlag,newProductType,showFlag,
|
|
|
) values (
|
|
|
#{shopId}, #{name}, #{aliasName}, #{commodityType}, #{bigTypeId}, #{smallTypeId}, #{tinyTypeId}, #{mainImage},
|
|
|
#{brandId}, #{productType}, #{tags}, #{unit}, #{normalPrice}, #{price}, #{includedTax}, #{minBuyNumber},
|
|
|
#{stock},
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <if test="qualificationNo != null and qualificationNo != ''">
|
|
|
+ #{qualificationNo},
|
|
|
+ </if>
|
|
|
+ <if test="productName != null and productName != ''">
|
|
|
+ #{productName},
|
|
|
+ </if>
|
|
|
+ <if test="qualificationTime != null and qualificationTime != ''">
|
|
|
+ #{qualificationTime},
|
|
|
+ </if>
|
|
|
+ <if test="qualificationLink != null and qualificationLink != ''">
|
|
|
+ #{qualificationLink},
|
|
|
+ </if>
|
|
|
<if test="productCategory != null and productCategory != '' ">
|
|
|
#{productCategory},
|
|
|
</if>
|
|
@@ -157,9 +184,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 +512,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 +559,7 @@
|
|
|
trainingMethod,
|
|
|
trainingType,
|
|
|
trainingFee,
|
|
|
- ifnull(newProductType,2) as newProductType
|
|
|
+ ifnull(newProductType, 2) as newProductType
|
|
|
from product
|
|
|
where productID = #{productId}
|
|
|
</select>
|