|
@@ -36,6 +36,10 @@
|
|
|
chp.includedTax,
|
|
|
chp.invoiceType,
|
|
|
chp.clubTaxPoint,
|
|
|
+ cs.cmPercent,
|
|
|
+ cs.organizePercent,
|
|
|
+ cs.shopPercent,
|
|
|
+ cs.costCheckFlag,
|
|
|
p.name,
|
|
|
p.shopID AS shopId,
|
|
|
p.mainImage as productImage,
|
|
@@ -77,9 +81,13 @@
|
|
|
chp.clubTaxPoint,
|
|
|
chp.shopTaxPoint,
|
|
|
cs.costPrice,
|
|
|
- cs.costProportional,
|
|
|
+ cs.shopPercent AS costProportional,
|
|
|
p.shopID AS shopId,
|
|
|
cs.unit,
|
|
|
+ cs.cmPercent,
|
|
|
+ cs.organizePercent,
|
|
|
+ cs.shopPercent,
|
|
|
+ cs.costCheckFlag,
|
|
|
p.name,
|
|
|
p.mainImage,
|
|
|
p.splitCode,
|
|
@@ -682,6 +690,18 @@
|
|
|
<if test="receiptStatus != null">
|
|
|
receiptStatus,
|
|
|
</if>
|
|
|
+ <if test="isColdChina != null">
|
|
|
+ isColdChina,
|
|
|
+ </if>
|
|
|
+ <if test="shopPostFlag != null">
|
|
|
+ shopPostFlag,
|
|
|
+ </if>
|
|
|
+ <if test="onlinePayWays != null">
|
|
|
+ onlinePayWays,
|
|
|
+ </if>
|
|
|
+ <if test="shopStatus != null">
|
|
|
+ shopStatus,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="shopOrderNo != null">
|
|
@@ -909,384 +929,53 @@
|
|
|
<if test="receiptStatus != null">
|
|
|
#{receiptStatus},
|
|
|
</if>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
-
|
|
|
- <insert id="insertOrderProduct" keyColumn="orderProductID" keyProperty="orderProductID"
|
|
|
- parameterType="com.caimei.model.po.CmOrderProductPo" useGeneratedKeys="true">
|
|
|
- insert into cm_order_product
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="skuId != null">
|
|
|
- skuId,
|
|
|
- </if>
|
|
|
- <if test="orderNo != null">
|
|
|
- orderNo,
|
|
|
- </if>
|
|
|
- <if test="orderID != null">
|
|
|
- orderID,
|
|
|
- </if>
|
|
|
- <if test="shopOrderID != null">
|
|
|
- shopOrderID,
|
|
|
- </if>
|
|
|
- <if test="shopOrderNo != null">
|
|
|
- shopOrderNo,
|
|
|
- </if>
|
|
|
- <if test="shopID != null">
|
|
|
- shopID,
|
|
|
- </if>
|
|
|
- <if test="productID != null">
|
|
|
- productID,
|
|
|
- </if>
|
|
|
- <if test="organizeProductID != null">
|
|
|
- organizeProductID,
|
|
|
- </if>
|
|
|
- <if test="organizeID != null">
|
|
|
- organizeID,
|
|
|
- </if>
|
|
|
- <if test="num != null">
|
|
|
- num,
|
|
|
- </if>
|
|
|
- <if test="presentNum != null">
|
|
|
- presentNum,
|
|
|
- </if>
|
|
|
- <if test="outStoreType != null">
|
|
|
- outStoreType,
|
|
|
- </if>
|
|
|
- <if test="productNo != null">
|
|
|
- productNo,
|
|
|
- </if>
|
|
|
- <if test="price != null">
|
|
|
- price,
|
|
|
- </if>
|
|
|
- <if test="normalPrice != null">
|
|
|
- normalPrice,
|
|
|
- </if>
|
|
|
- <if test="costPrice != null">
|
|
|
- costPrice,
|
|
|
- </if>
|
|
|
- <if test="totalAmount != null">
|
|
|
- totalAmount,
|
|
|
- </if>
|
|
|
- <if test="totalFee != null">
|
|
|
- totalFee,
|
|
|
- </if>
|
|
|
- <if test="shouldPayFee != null">
|
|
|
- shouldPayFee,
|
|
|
- </if>
|
|
|
- <if test="discount != null">
|
|
|
- discount,
|
|
|
- </if>
|
|
|
- <if test="discountPrice != null">
|
|
|
- discountPrice,
|
|
|
- </if>
|
|
|
- <if test="taxRate != null">
|
|
|
- taxRate,
|
|
|
- </if>
|
|
|
- <if test="addedValueTax != null">
|
|
|
- addedValueTax,
|
|
|
- </if>
|
|
|
- <if test="totalAddedValueTax != null">
|
|
|
- totalAddedValueTax,
|
|
|
- </if>
|
|
|
- <if test="shouldPayTotalTax != null">
|
|
|
- shouldPayTotalTax,
|
|
|
- </if>
|
|
|
- <if test="singleShouldPayTotalTax != null">
|
|
|
- singleShouldPayTotalTax,
|
|
|
- </if>
|
|
|
- <if test="shopProductAmount != null">
|
|
|
- shopProductAmount,
|
|
|
- </if>
|
|
|
- <if test="shopFee != null">
|
|
|
- shopFee,
|
|
|
- </if>
|
|
|
- <if test="otherFee != null">
|
|
|
- otherFee,
|
|
|
- </if>
|
|
|
- <if test="cmFee != null">
|
|
|
- cmFee,
|
|
|
- </if>
|
|
|
- <if test="singleShopFee != null">
|
|
|
- singleShopFee,
|
|
|
- </if>
|
|
|
- <if test="singleOtherFee != null">
|
|
|
- singleOtherFee,
|
|
|
- </if>
|
|
|
- <if test="singleCmFee != null">
|
|
|
- singleCmFee,
|
|
|
- </if>
|
|
|
- <if test="status != null">
|
|
|
- `status`,
|
|
|
- </if>
|
|
|
- <if test="totalBeans != null">
|
|
|
- totalBeans,
|
|
|
- </if>
|
|
|
- <if test="useBalanceAmount != null">
|
|
|
- useBalanceAmount,
|
|
|
- </if>
|
|
|
- <if test="useBeanAmount != null">
|
|
|
- useBeanAmount,
|
|
|
- </if>
|
|
|
- <if test="notOutStore != null">
|
|
|
- notOutStore,
|
|
|
- </if>
|
|
|
- <if test="cmbeanPrice != null">
|
|
|
- cmbeanPrice,
|
|
|
- </if>
|
|
|
- <if test="isActProduct != null">
|
|
|
- isActProduct,
|
|
|
- </if>
|
|
|
- <if test="isGiftProduct != null">
|
|
|
- isGiftProduct,
|
|
|
- </if>
|
|
|
- <if test="productActInfo != null">
|
|
|
- productActInfo,
|
|
|
- </if>
|
|
|
- <if test="buyAgainFlag != null">
|
|
|
- buyAgainFlag,
|
|
|
- </if>
|
|
|
- <if test="confirmProductFlag != null">
|
|
|
- confirmProductFlag,
|
|
|
- </if>
|
|
|
- <if test="payStatus != null">
|
|
|
- payStatus,
|
|
|
- </if>
|
|
|
- <if test="shopName != null">
|
|
|
- shopName,
|
|
|
- </if>
|
|
|
- <if test="name != null">
|
|
|
- `name`,
|
|
|
- </if>
|
|
|
- <if test="productUnit != null">
|
|
|
- productUnit,
|
|
|
- </if>
|
|
|
- <if test="productImage != null">
|
|
|
- productImage,
|
|
|
- </if>
|
|
|
- <if test="actType != null">
|
|
|
- actType,
|
|
|
- </if>
|
|
|
- <if test="actPreferential != null">
|
|
|
- actPreferential,
|
|
|
- </if>
|
|
|
- <if test="productType != null">
|
|
|
- productType,
|
|
|
- </if>
|
|
|
- <if test="orderPromotionsId != null">
|
|
|
- orderPromotionsId,
|
|
|
- </if>
|
|
|
- <if test="preferential != null">
|
|
|
- preferential,
|
|
|
- </if>
|
|
|
- <if test="discountFee != null">
|
|
|
- discountFee,
|
|
|
- </if>
|
|
|
- <if test="cancelNum != null">
|
|
|
- cancelNum,
|
|
|
- </if>
|
|
|
- <if test="supplierTaxRate != null">
|
|
|
- supplierTaxRate,
|
|
|
- </if>
|
|
|
- <if test="includedTax != null">
|
|
|
- includedTax,
|
|
|
+ <if test="isColdChina != null">
|
|
|
+ #{isColdChina},
|
|
|
</if>
|
|
|
- <if test="invoiceType != null">
|
|
|
- invoiceType,
|
|
|
+ <if test="shopPostFlag != null">
|
|
|
+ #{shopPostFlag},
|
|
|
</if>
|
|
|
- <if test="ladderPriceFlag != null">
|
|
|
- ladderPriceFlag,
|
|
|
+ <if test="onlinePayWays != null">
|
|
|
+ #{onlinePayWays},
|
|
|
</if>
|
|
|
- <if test="heUserId != null">
|
|
|
- heUserId,
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="skuId != null">
|
|
|
- #{skuId},
|
|
|
- </if>
|
|
|
- <if test="orderNo != null">
|
|
|
- #{orderNo,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="orderID != null">
|
|
|
- #{orderID,jdbcType=BIGINT},
|
|
|
- </if>
|
|
|
- <if test="shopOrderID != null">
|
|
|
- #{shopOrderID,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="shopOrderNo != null">
|
|
|
- #{shopOrderNo,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="shopID != null">
|
|
|
- #{shopID,jdbcType=BIGINT},
|
|
|
- </if>
|
|
|
- <if test="productID != null">
|
|
|
- #{productID,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="organizeProductID != null">
|
|
|
- #{organizeProductID,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="organizeID != null">
|
|
|
- #{organizeID},
|
|
|
- </if>
|
|
|
- <if test="num != null">
|
|
|
- #{num,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="presentNum != null">
|
|
|
- #{presentNum,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="outStoreType != null">
|
|
|
- #{outStoreType,jdbcType=CHAR},
|
|
|
- </if>
|
|
|
- <if test="productNo != null">
|
|
|
- #{productNo,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="price != null">
|
|
|
- #{price,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="normalPrice != null">
|
|
|
- #{normalPrice,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="costPrice != null">
|
|
|
- #{costPrice,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="totalAmount != null">
|
|
|
- #{totalAmount,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="totalFee != null">
|
|
|
- #{totalFee,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="shouldPayFee != null">
|
|
|
- #{shouldPayFee,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="discount != null">
|
|
|
- #{discount,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="discountPrice != null">
|
|
|
- #{discountPrice,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="taxRate != null">
|
|
|
- #{taxRate,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="addedValueTax != null">
|
|
|
- #{addedValueTax,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="totalAddedValueTax != null">
|
|
|
- #{totalAddedValueTax,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="shouldPayTotalTax != null">
|
|
|
- #{shouldPayTotalTax,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="singleShouldPayTotalTax != null">
|
|
|
- #{singleShouldPayTotalTax,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="shopProductAmount != null">
|
|
|
- #{shopProductAmount,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="shopFee != null">
|
|
|
- #{shopFee,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="otherFee != null">
|
|
|
- #{otherFee,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="cmFee != null">
|
|
|
- #{cmFee,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="singleShopFee != null">
|
|
|
- #{singleShopFee,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="singleOtherFee != null">
|
|
|
- #{singleOtherFee,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="singleCmFee != null">
|
|
|
- #{singleCmFee,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="status != null">
|
|
|
- #{status,jdbcType=CHAR},
|
|
|
- </if>
|
|
|
- <if test="totalBeans != null">
|
|
|
- #{totalBeans,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="useBalanceAmount != null">
|
|
|
- #{useBalanceAmount,jdbcType=DOUBLE},
|
|
|
- </if>
|
|
|
- <if test="useBeanAmount != null">
|
|
|
- #{useBeanAmount,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="notOutStore != null">
|
|
|
- #{notOutStore,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="cmbeanPrice != null">
|
|
|
- #{cmbeanPrice,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="isActProduct != null">
|
|
|
- #{isActProduct,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="isGiftProduct != null">
|
|
|
- #{isGiftProduct,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="productActInfo != null">
|
|
|
- #{productActInfo,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="buyAgainFlag != null">
|
|
|
- #{buyAgainFlag,jdbcType=CHAR},
|
|
|
- </if>
|
|
|
- <if test="confirmProductFlag != null">
|
|
|
- #{confirmProductFlag,jdbcType=CHAR},
|
|
|
- </if>
|
|
|
- <if test="payStatus != null">
|
|
|
- #{payStatus,jdbcType=CHAR},
|
|
|
- </if>
|
|
|
- <if test="shopName != null">
|
|
|
- #{shopName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="name != null">
|
|
|
- #{name,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="productUnit != null">
|
|
|
- #{productUnit,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="productImage != null">
|
|
|
- #{productImage,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="actType != null">
|
|
|
- #{actType,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="actPreferential != null">
|
|
|
- #{actPreferential,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="productType != null">
|
|
|
- #{productType},
|
|
|
- </if>
|
|
|
- <if test="orderPromotionsId != null">
|
|
|
- #{orderPromotionsId},
|
|
|
- </if>
|
|
|
- <if test="preferential != null">
|
|
|
- #{preferential,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="discountFee != null">
|
|
|
- #{discountFee,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="cancelNum != null">
|
|
|
- #{cancelNum,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="supplierTaxRate != null">
|
|
|
- #{supplierTaxRate,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="includedTax != null">
|
|
|
- #{includedTax,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="invoiceType != null">
|
|
|
- #{invoiceType,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="ladderPriceFlag != null">
|
|
|
- #{ladderPriceFlag,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="heUserId != null">
|
|
|
- #{heUserId},
|
|
|
+ <if test="shopStatus != null">
|
|
|
+ #{shopStatus},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
+ <insert id="insertOrderProduct" keyColumn="orderProductID" keyProperty="orderProductID"
|
|
|
+ parameterType="com.caimei.model.po.CmOrderProductPo" useGeneratedKeys="true">
|
|
|
+ INSERT INTO cm_order_product (orderID, orderNo, shopOrderID, shopOrderNo, organizeID, orderPromotionsId,
|
|
|
+ productId, shopId,
|
|
|
+ name,
|
|
|
+ productImage, price, shopName, costPrice, normalPrice, ladderPriceFlag,
|
|
|
+ discountPrice, discount,
|
|
|
+ totalAmount, totalFee, shouldPayFee, productUnit, num, presentNum, discountFee,
|
|
|
+ includedTax,
|
|
|
+ invoiceType, taxRate, addedValueTax, totalAddedValueTax, supplierTaxRate,
|
|
|
+ singleShouldPayTotalTax, shouldPayTotalTax,
|
|
|
+ shopProductAmount, singleShopFee, shopFee, singleOtherFee, otherFee, singleCmFee,
|
|
|
+ cmFee,
|
|
|
+ payStatus, buyAgainFlag, notOutStore, isActProduct, productType, svipPriceFlag,
|
|
|
+ svipPriceType,
|
|
|
+ svipDiscount, svipReduction, skuID, cmPercent, organizePercent, shopPercent)
|
|
|
+ VALUES (#{orderID}, #{orderNo}, #{shopOrderID}, #{shopOrderNo}, #{organizeID}, #{orderPromotionsId},
|
|
|
+ #{productID}, #{shopID},
|
|
|
+ #{name},
|
|
|
+ #{productImage}, #{price}, #{shopName}, #{costPrice}, #{normalPrice}, #{ladderPriceFlag},
|
|
|
+ #{discountPrice}, #{discount},
|
|
|
+ #{totalAmount}, #{totalFee}, #{shouldPayFee}, #{productUnit}, #{num}, #{presentNum}, #{discountFee},
|
|
|
+ #{includedTax},
|
|
|
+ #{invoiceType}, #{taxRate}, #{addedValueTax}, #{totalAddedValueTax}, #{supplierTaxRate},
|
|
|
+ #{singleShouldPayTotalTax}, #{shouldPayTotalTax},
|
|
|
+ #{shopProductAmount}, #{singleShopFee}, #{shopFee}, #{singleOtherFee}, #{otherFee}, #{singleCmFee},
|
|
|
+ #{cmFee},
|
|
|
+ #{payStatus}, #{buyAgainFlag}, #{notOutStore}, #{isActProduct}, #{productType}, #{svipPriceFlag},
|
|
|
+ #{svipPriceType}, #{svipDiscount}, #{svipReduction}, #{skuId}, #{cmPercent}, #{organizePercent},
|
|
|
+ #{shopPercent})
|
|
|
+ </insert>
|
|
|
+
|
|
|
<insert id="insertOrderProductLadderPrice" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
|
|
|
parameterType="com.caimei.model.po.OrderProductLadderPricePo">
|
|
|
insert into order_product_ladder_price (orderProductId, ladderNum, buyNum, buyPrice, createDate)
|
|
@@ -1599,6 +1288,10 @@
|
|
|
chp.includedTax,
|
|
|
chp.invoiceType,
|
|
|
chp.clubTaxPoint,
|
|
|
+ cs.cmPercent,
|
|
|
+ cs.organizePercent,
|
|
|
+ cs.shopPercent,
|
|
|
+ cs.costCheckFlag,
|
|
|
p.name,
|
|
|
p.shopID AS shopId,
|
|
|
p.mainImage as productImage,
|
|
@@ -1655,4 +1348,4 @@
|
|
|
<select id="getHelpContent" resultType="java.lang.String">
|
|
|
select content from helppage where helpPageID=#{helpId}
|
|
|
</select>
|
|
|
-</mapper>
|
|
|
+</mapper>
|