123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.caimei365.order.mapper.SubmitMapper">
- <insert id="insertMainOrder" keyColumn="orderID" keyProperty="orderId"
- parameterType="com.caimei365.order.model.po.OrderPo" useGeneratedKeys="true">
- INSERT INTO cm_order (orderSeen, orderSource, orderNo, userID, clubID, organizeID, buyUserID, spID, orderTime,
- updateDate,
- delFlag,
- userBeans, orderType, orderSubmitType, confirmFlag, onlinePayFlag, splitFlag, payFlag,
- receiptStatus, payStatus, zeroCostFlag, sendOutStatus, refundType, affirmPaymentFlag,
- productCount, presentCount, promotionalGiftsCount, hasActProduct, promotionFullReduction,
- svipFullReduction, secondHandOrderFlag, invoiceFlag, freePostFlag, freight,
- productTotalFee,
- orderTotalFee, payTotalFee, payableAmount, balancePayFee, couponAmount, status,
- confirmTime,
- payTime, rebateFlag, rebateFee, clauseID, clauseName)
- VALUES (#{orderSeen}, #{orderSource}, #{orderNo}, #{userId}, #{clubId}, #{organizeId}, #{buyUserId}, #{spId},
- #{orderTime},
- #{updateDate},
- #{delFlag},
- #{userBeans}, #{orderType}, #{orderSubmitType}, #{confirmFlag}, #{onlinePayFlag}, #{splitFlag},
- #{payFlag},
- #{receiptStatus}, #{payStatus}, #{zeroCostFlag}, #{sendOutStatus}, #{refundType}, #{affirmPaymentFlag},
- #{productCount}, #{presentCount}, #{promotionalGiftsCount}, #{hasActProduct}, #{promotionFullReduction},
- #{svipFullReduction},
- #{secondHandOrderFlag}, #{invoiceFlag}, #{postageFlag}, #{postage}, #{productTotalFee},
- #{orderTotalFee},
- #{payTotalFee}, #{payableAmount}, #{balancePayFee}, #{couponAmount}, #{status}, #{confirmTime},
- #{payTime}, #{rebateFlag}, #{rebateFee},
- #{clauseId}, #{clauseName})
- </insert>
- <insert id="insertShopOrder" keyColumn="shopOrderID" keyProperty="shopOrderId"
- parameterType="com.caimei365.order.model.po.OrderShopPo" useGeneratedKeys="true">
- INSERT INTO cm_shop_order (onlinePayWays, shopOrderNo, orderID, orderNo, organizeID, isColdChina, shopID, note,
- userID, clubID, orderType,
- spID, orderPromotionsId, promotionFullReduction, svipShopReduction, brokerage,
- canRefundAmount, itemCount, shopStatus, accountAmount, useBalanceFlag,
- totalAmount, productAmount, needPayAmount, shopProductAmount, shopPostFee,
- shopPostFlag,
- shopTaxFee, confirmTime,
- shouldPayShopAmount, orderTime, orderSubmitType, splitFlag, payStatus,
- payedShopAmount, splitCode, realPay, eachDiscount, receiptStatus)
- VALUES (#{onlinePayWays}, #{shopOrderNo}, #{orderId}, #{orderNo}, #{organizeId}, #{isColdChina}, #{shopId},
- #{note}, #{userId}, #{clubId}, #{orderType},
- #{spId}, #{orderPromotionsId}, #{promotionFullReduction}, #{svipShopReduction}, #{brokerage},
- #{canRefundAmount}, #{itemCount}, #{shopStatus}, #{accountAmount}, #{useBalanceFlag},
- #{totalAmount}, #{productAmount}, #{needPayAmount}, #{shopProductAmount}, #{shopPostFee},
- #{shopPostFlag}, #{shopTaxFee}, #{confirmTime},
- #{shouldPayShopAmount}, #{orderTime}, #{orderSubmitType}, #{splitFlag}, #{payStatus},
- #{payedShopAmount}, #{splitCode}, #{realPay}, #{eachDiscount}, 1)
- </insert>
- <update id="updateOrder">
- update cm_order
- set freight = #{freight}
- where orderId = #{orderId}
- </update>
- <insert id="insertOrderProduct" keyColumn="orderProductID" keyProperty="orderProductId"
- parameterType="com.caimei365.order.model.po.OrderProductPo" useGeneratedKeys="true">
- INSERT INTO cm_order_product (orderID, orderNo, shopOrderID, shopOrderNo, organizeID, orderPromotionsId,
- productId, shopId,
- name, organizeCostPrice, cmCostPrice,
- 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}, #{organizeCostPrice}, #{cmCostPrice},
- #{image}, #{price}, #{shopName}, #{costPrice}, #{normalPrice}, #{ladderPriceFlag},
- #{discountPrice}, #{discount},
- #{totalAmount}, #{totalFee}, #{shouldPayFee}, #{productUnit}, #{num}, #{presentNum}, #{discountFee},
- #{includedTax},
- #{invoiceType}, #{taxRate}, #{addedValueTax}, #{totalAddedValueTax}, #{shopTaxRate},
- #{singleShouldPayTotalTax}, #{shouldPayTotalTax},
- #{shopProductAmount}, #{singleShopFee}, #{shopFee}, #{singleOtherFee}, #{otherFee}, #{singleCmFee},
- #{cmFee},
- #{payStatus}, #{buyAgainFlag}, #{notOutStore}, #{actProduct}, #{productType}, #{svipPriceFlag},
- #{svipPriceType}, #{svipDiscount}, #{svipReduction}, #{skuId}, #{cmPercent}, #{organizePercent},
- #{shopPercent})
- </insert>
- <insert id="insertOrderPromotions" keyColumn="id" keyProperty="id"
- parameterType="com.caimei365.order.model.vo.PromotionsVo" useGeneratedKeys="true">
- INSERT INTO cm_promotions_order (orderId, promotionsId, name, description, type, mode, touchPrice, reducedPrice,
- discount, status, beginTime, endTime)
- VALUES (#{orderId}, #{id}, #{name}, #{description}, #{type}, #{mode}, #{touchPrice}, #{reducedPrice},
- #{discount},
- #{status}, #{beginTime}, #{endTime})
- </insert>
- <insert id="insertLadderPrices" keyColumn="id" keyProperty="id"
- parameterType="com.caimei365.order.model.vo.LadderPriceVo" useGeneratedKeys="true">
- INSERT INTO order_product_ladder_price (orderProductId, ladderNum, buyNum, buyPrice, createDate)
- VALUES (#{orderProductId}, #{ladderNum}, #{buyNum}, #{buyPrice}, #{createDate})
- </insert>
- <update id="updateShopOrderIds">
- UPDATE cm_order
- SET shopOrderIDs = #{shopOrderIds}
- WHERE orderID = #{orderId}
- </update>
- <insert id="insertOrderInvoice" parameterType="com.caimei365.order.model.po.InvoicePo">
- INSERT INTO bp_order_invoice (orderId, invoiceTitle, type, invoiceContent, invoiceTitleType, corporationTaxNum,
- registeredAddress, registeredPhone, bankAccountNo, openBank)
- VALUES (#{orderId}, #{invoiceTitle}, #{type}, #{invoiceContent}, #{headingType}, #{corporationTaxNum},
- #{registeredAddress}, #{registeredPhone}, #{bankAccountNo}, #{openBank})
- </insert>
- <insert id="insertOrderUserInfo" parameterType="com.caimei365.order.model.po.OrderUserInfoPo">
- INSERT INTO bp_order_userinfo (orderId, clubId, userId, name, shouHuoRen, mobile,
- townId, province, city, town, address)
- VALUES (#{orderId}, #{clubId}, #{userId}, #{name}, #{receiver}, #{mobile},
- #{townId}, #{province}, #{city}, #{town}, #{address})
- </insert>
- <insert id="insertCouponOrderRecord" parameterType="com.caimei365.order.model.po.CouponOrderRecordPo">
- INSERT INTO cm_coupon_order_record (orderId, clubCouponId, couponType, couponAmount, touchPrice, createDate)
- VALUES (#{orderId}, #{clubCouponId}, #{couponType}, #{couponAmount}, #{touchPrice}, #{createDate})
- </insert>
- <update id="updateUserMoney">
- UPDATE USER
- SET userMoney = #{userMoney},
- ableUserMoney = #{ableUserMoney}
- WHERE userID = #{userId}
- </update>
- <update id="updateOrderInvoice">
- UPDATE bp_order_invoice SET orderId=#{orderId},
- <set>
- <if test="invoiceTitle != null">
- invoiceTitle = #{invoiceTitle},
- </if>
- <if test="type != null">
- type = #{type,jdbcType=CHAR},
- </if>
- <if test="invoiceContent != null">
- invoiceContent = #{invoiceContent},
- </if>
- <if test="invoiceTitleType != null">
- invoiceTitleType = #{invoiceTitleType},
- </if>
- <if test="corporationTaxNum != null">
- corporationTaxNum = #{corporationTaxNum},
- </if>
- <if test="registeredAddress != null">
- registeredAddress = #{registeredAddress},
- </if>
- <if test="registeredPhone != null">
- registeredPhone = #{registeredPhone},
- </if>
- <if test="bankAccountNo != null">
- bankAccountNo = #{bankAccountNo},
- </if>
- <if test="openBank != null">
- openBank = #{openBank},
- </if>
- </set>
- WHERE id = #{id}
- </update>
- <update id="updateOnlinePayFlag">
- UPDATE cm_order
- SET onlinePayFlag = #{onlinePayFlag}
- WHERE orderID = #{orderId}
- </update>
- <update id="updateOnlinePayWays">
- UPDATE cm_shop_order
- SET onlinePayWays = #{onlinePayWays}
- WHERE orderID = #{orderId}
- </update>
- <select id="getOrganizeSkuInfo" resultType="com.caimei365.order.model.po.CmOrganizeSkuPo">
- SELECT distinct cs.skuId,
- cs.productId,
- cs.minBuyNumber,
- cs.price,
- cs.unit,
- cs.stock,
- ifnull(copi.costCheckFlag, 1) as costCheckFlag,
- IFNULL(cs.organizeCostPrice, 0) AS organizeCostPrice,
- IFNULL(cs.cmCostPrice, 0) AS cmCostPrice,
- ifnull(cs.organizePercent, 0) as organizePercent,
- ifnull(cs.shopPercent, 0) as shopPercent,
- ifnull(cs.cmPercent, 0) as cmPercent
- FROM cm_sku cs
- LEFT JOIN cm_organize_product_info copi ON cs.productId = copi.productId
- WHERE cs.skuId = #{skuId}
- AND cs.organizeId = #{organizeId}
- AND copi.organizeId = #{organizeId}
- </select>
- <select id="getDistributionSkuInfo" resultType="com.caimei365.order.model.po.CmOrganizeSkuPo">
- SELECT distinct cs.skuId,
- cs.productId,
- cs.minBuyNumber,
- cds.price,
- cs.unit,
- cs.stock,
- ifnull(cds.costCheckFlag, 1) as costCheckFlag,
- IFNULL(cds.organizeCostPrice, 0) AS organizeCostPrice,
- IFNULL(cds.cmCostPrice, 0) AS cmCostPrice,
- ifnull(cds.organizePercent, 0) as organizePercent,
- ifnull(cds.shopPercent, 0) as shopPercent,
- ifnull(cds.cmPercent, 0) as cmPercent
- FROM cm_sku cs
- LEFT JOIN cm_distribution_sku cds ON cs.skuId = cds.skuId
- LEFT JOIN cm_organize_product_info copi ON cs.productId = copi.productId
- WHERE cs.skuId = #{skuId}
- AND cs.organizeId = #{organizeId}
- AND copi.organizeId = #{organizeId}
- </select>
- <select id="getOrderInvoice" resultType="com.caimei365.order.model.po.InvoicePo">
- SELECT id,
- orderId,
- invoiceTitle,
- corporationTaxNum,
- registeredAddress,
- registeredPhone,
- bankAccountNo,
- openBank
- FROM bp_order_invoice
- WHERE orderId = #{orderId}
- </select>
- <select id="getOperationIdByUnionId" resultType="java.lang.Integer">
- SELECT `id`
- FROM cm_mall_operation_user
- WHERE unionId = #{unionId}
- AND userID = #{userId}
- AND delFlag = '0'
- </select>
- <select id="getServiceProviderUserId" resultType="java.lang.Integer">
- SELECT userID
- FROM serviceprovider
- WHERE serviceProviderID = #{serviceProviderId}
- </select>
- <select id="getDistributionUserId" resultType="java.lang.Integer">
- SELECT userID
- FROM cm_distribution
- WHERE id = #{id}
- </select>
- <select id="getOrderUserBoById" resultType="com.caimei365.order.model.bo.OrderParamBo">
- SELECT userID AS userId,
- clubID AS clubId,
- userName,
- bindMobile,
- userMoney,
- ableUserMoney,
- userIdentity,
- userBeans
- FROM user
- WHERE userID = #{userId}
- </select>
- <select id="getProductDetails" resultType="com.caimei365.order.model.po.OrderProductPo">
- SELECT cs.skuId AS skuId,
- p.productID AS productId,
- p.shopID AS shopId,
- p.`name` AS `name`,
- p.mainImage AS image,
- cs.price,
- cs.costPrice,
- IFNULL((SELECT costCheckFlag
- FROM cm_organize_product_info
- WHERE productId = cs.productId AND organizeId = cs.organizeId), 1) AS costCheckFlag,
- cs.shopPercent as costProportional,
- p.productCategory,
- cs.ladderPriceFlag,
- p.includedTax,
- p.invoiceType,
- p.taxPoint AS taxRate,
- cs.unit AS productUnit,
- cs.normalPrice,
- p.supplierTaxPoint AS shopTaxRate,
- p.splitCode as splitCode
- FROM product p
- LEFT JOIN cm_sku cs on p.productID = cs.productId
- WHERE cs.skuId = #{skuId}
- and cs.organizeId = 0
- </select>
- <select id="getDistributionProductDetails" resultType="com.caimei365.order.model.po.OrderProductPo">
- SELECT cs.skuId AS skuId,
- p.productID AS productId,
- p.shopID AS shopId,
- p.`name` AS `name`,
- p.mainImage AS image,
- cds.price,
- cds.costPrice,
- cds.costCheckFlag AS costCheckFlag,
- cds.shopPercent as costProportional,
- p.productCategory,
- cs.ladderPriceFlag,
- cdp.includedTax,
- cdp.invoiceType,
- cdp.clubTaxPoint AS taxRate,
- cs.unit AS productUnit,
- cs.normalPrice,
- cdp.shopTaxPoint AS shopTaxRate,
- p.splitCode as splitCode
- FROM product p
- LEFT JOIN cm_distribution_product cdp ON p.productID = cdp.productId
- LEFT JOIN cm_sku cs on p.productID = cs.productId
- LEFT JOIN cm_distribution_sku cds on cds.productID = cs.productId and cds.skuId = cs.skuId
- WHERE cs.skuId = #{skuId}
- and cs.organizeId = 0
- </select>
- <select id="getProductOrganizeDetails" resultType="com.caimei365.order.model.po.OrderProductPo">
- SELECT cs.skuId AS skuId,
- p.productID AS productId,
- p.shopID AS shopId,
- p.`name` AS `name`,
- p.mainImage AS image,
- cs.price,
- cs.costPrice,
- IFNULL((SELECT costCheckFlag
- FROM cm_organize_product_info
- WHERE productId = cs.productId AND organizeId = cs.organizeId), 1) AS costCheckFlag,
- cs.shopPercent as costProportional,
- p.productCategory,
- cs.ladderPriceFlag,
- p.includedTax,
- p.invoiceType,
- p.taxPoint AS taxRate,
- cs.unit AS productUnit,
- cs.normalPrice,
- p.supplierTaxPoint AS shopTaxRate,
- p.splitCode as splitCode
- FROM product p
- LEFT JOIN cm_sku cs on p.productID = cs.productId
- WHERE cs.skuId = #{skuId}
- and cs.organizeId = 4
- </select>
- <select id="getClauseNameById" resultType="java.lang.String">
- SELECT `name`
- FROM bp_clause
- WHERE id = #{clauseId}
- </select>
- <select id="getClubId" resultType="java.lang.Integer">
- select clubId
- from club
- where userId = #{userId}
- </select>
- <select id="getAddressDetailById" resultType="com.caimei365.order.model.vo.AddressVo">
- SELECT a.addressID AS addressId,
- a.userID AS userId,
- a.shouHuoRen AS receiver,
- a.townID AS townId,
- a.address,
- a.mobile,
- a.defaultFlag,
- t.name AS town,
- c.name AS city,
- c.cityID AS cityId,
- p.name AS province,
- p.provinceID AS provinceId
- FROM address a
- LEFT JOIN town t ON t.townID = a.townID
- LEFT JOIN city c ON c.cityID = t.cityID
- LEFT JOIN province p ON p.provinceID = c.provinceID
- WHERE a.addressID = #{addressId}
- LIMIT 1
- </select>
- <select id="getSvipProductDetails" resultType="com.caimei365.order.model.po.SvipProductPo">
- select if(id is not null and csp.status = 0, 1, 0) as svipProductFlag,
- priceType as svipPriceType,
- discount as svipDiscount,
- discountPrice as svipDiscountPrice
- from cm_svip_product_sku
- left join cm_svip_product csp on cm_svip_product_sku.productId = csp.productId
- where skuId = #{skuId}
- and csp.status = 0
- </select>
- <select id="findLowOrder" resultType="java.lang.Integer">
- select orderID
- from cm_order
- where status not in (6, 7)
- and payTotalFee <![CDATA[ < ]]> 1000
- and orderTime <![CDATA[ > ]]> #{orderTime}
- and userID = #{userId}
- </select>
- <select id="findShops" resultType="com.caimei365.order.model.po.OrderShopPo">
- SELECT DISTINCT
- s.shopID AS shopId,
- p.splitCode
- FROM shop s
- LEFT JOIN product p ON p.shopID = s.shopID
- WHERE p.productID IN
- <foreach collection="productIdList" open="(" separator="," close=")" item="productId">
- #{productId}
- </foreach>
- GROUP BY s.shopID,p.splitCode
- </select>
- <select id="findSplitResult" resultType="java.lang.Integer">
- SELECT COUNT(*) FROM product
- WHERE productId IN
- <foreach collection="productIdList" open="(" separator="," close=")" item="productId">
- #{productId}
- </foreach>
- AND (splitcode IS NULL OR splitcode ='')
- </select>
- <select id="getRechargeProductDetails" resultType="com.caimei365.order.model.po.OrderProductPo">
- SELECT cs.skuId AS skuId,
- p.productID AS productId,
- p.shopID AS shopId,
- p.`name` AS `name`,
- p.mainImage AS image,
- cs.price,
- cs.costPrice,
- IFNULL((SELECT costCheckFlag
- FROM cm_organize_product_info
- WHERE productId = cs.productId AND organizeId = cs.organizeId), 1) AS costCheckFlag,
- cs.shopPercent as costProportional,
- p.productCategory,
- cs.ladderPriceFlag,
- p.includedTax,
- p.invoiceType,
- p.taxPoint AS taxRate,
- cs.unit AS productUnit,
- cs.normalPrice,
- p.supplierTaxPoint AS shopTaxRate,
- p.splitCode as splitCode
- FROM product p
- LEFT JOIN cm_sku cs on p.productID = cs.productId
- WHERE cs.productId = #{productId}
- and cs.organizeId = 0
- </select>
- <select id="findOrderProducts" resultType="com.caimei365.order.model.vo.OrderProductVo">
- select
- orderProductId,
- orderNo,
- orderId,
- shopOrderId,
- shopOrderNo,
- shopID,
- productId,
- organizeId,
- num,
- presentNum,
- outStoreType,
- skuId,
- productNo,
- price,
- normalPrice,
- costPrice,
- totalAmount,
- totalFee,
- shouldPayFee,
- discount,
- discountPrice,
- includedTax,
- invoiceType,
- ladderPriceFlag,
- taxRate,
- supplierTaxRate,
- addedValueTax,
- totalAddedValueTax,
- shouldPayTotalTax,
- singleShouldPayTotalTax,
- shopProductAmount,
- shopFee,
- otherFee,
- cmFee,
- singleShopFee,
- singleOtherFee,
- singleCmFee,
- status,
- totalBeans,
- useBalanceAmount,
- useBeanAmount,
- notOutStore,
- cmbeanPrice,
- isActProduct,
- isGiftProduct,
- productActInfo,
- buyAgainFlag,
- confirmProductFlag,
- payStatus,
- shopName,
- name,
- productUnit,
- productImage,
- actType,
- actPreferential,
- ifnull(productType,0) as productType,
- orderPromotionsId,
- preferential,
- discountFee,
- cancelNum,
- heUserId,
- svipPriceFlag,
- svipPriceType,
- svipDiscount,
- svipReduction,
- cmPercent,
- organizePercent,
- shopPercent
- from cm_order_product
- where orderProductID in
- <foreach item="orderProductId" index="index" collection="orderProductIds" open="(" separator="," close=")">
- #{orderProductId}
- </foreach>
- </select>
- <update id="updateOrderProduct">
- update cm_order_product
- set price = #{price},
- discountPrice = #{price},
- costPrice = #{costPrice},
- totalAmount = #{totalAmount},
- totalFee = #{totalFee},
- shouldPayFee = #{shouldPayFee},
- ladderPriceFlag = #{ladderPriceFlag},
- taxRate = #{taxRate},
- addedValueTax = #{addedValueTax},
- totalAddedValueTax = #{totalAddedValueTax},
- shouldPayTotalTax = #{shouldPayTotalTax},
- singleShouldPayTotalTax = #{singleShouldPayTotalTax},
- shopProductAmount = #{shopProductAmount},
- singleShopFee = #{singleShopFee},
- shopFee = #{shopFee}
- where orderProductId = #{orderProductId}
- </update>
- <update id="updateShopOrder">
- update cm_shop_order
- set
- <if test="status != null">
- shopStatus = #{status},
- </if>
- <if test="realNeedPay != null">
- realPay = #{realNeedPay},
- </if>
- <if test="receiptAmount != null">
- receiptAmount = #{receiptAmount},
- </if>
- <if test="accountAmount != null">
- accountAmount = #{accountAmount},
- </if>
- <if test="productAmount != null">
- productAmount = #{productAmount},
- </if>
- <if test="totalAmount != null">
- totalAmount = #{totalAmount},
- </if>
- <if test="needPayAmount != null">
- needPayAmount = #{needPayAmount},
- </if>
- <if test="promotionFullReduction != null">
- promotionFullReduction = #{promotionFullReduction},
- </if>
- <if test="receiptStatus != null">
- receiptStatus = #{receiptStatus},
- </if>
- <if test="shopProductAmount != null">
- shopProductAmount = #{shopProductAmount},
- </if>
- <if test="shopTaxFee != null">
- shopTaxFee = #{shopTaxFee},
- </if>
- <if test="shouldPayShopAmount != null">
- shouldPayShopAmount = #{shouldPayShopAmount}
- </if>
- where shopOrderId = #{shopOrderId}
- </update>
- <update id="updateUserMoneyByChange">
- update user
- set userMoney = userMoney + #{change},
- ableUserMoney = ableUserMoney + #{change}
- where userId = #{userId}
- </update>
- <update id="updateShopOrderCoupon">
- update cm_shop_order
- set needPayAmount = #{needPayAmount},
- totalAmount = #{totalAmount},
- couponAmount = #{couponAmount},
- couponClubId = #{couponClubId},
- realPay = #{realPay},
- shopProductAmount = #{shopProductAmount},
- shouldPayShopAmount = #{shouldPayShopAmount}
- where shopOrderId = #{shopOrderId}
- </update>
- </mapper>
|