a.orderID AS orderID,
a.orderNo AS orderNo,
a.organizeID AS organizeID,
a.userID AS userID,
a.buyUserID AS buyUserID,
a.shopOrderIDs AS shopOrderIDs,
a.orderSubmitType AS orderSubmitType,
a.orderType AS orderType,
a.secondHandOrderFlag AS secondHandOrderFlag,
a.status AS status,
a.productTotalFee AS productTotalFee,
a.orderTotalFee AS orderTotalFee,
a.payTotalFee AS payTotalFee,
a.payableAmount AS payableAmount,
a.balancePayFee AS balancePayFee ,
a.discountFee AS discountFee,
a.spID AS spID,
a.mainSpID AS mainSpID,
a.note AS note,
a.clubID AS clubID,
a.clubScanTime AS clubScanTime,
a.payWay AS payWay,
a.orderSource AS orderSource,
a.orderTime AS orderTime,
a.confirmTime AS confirmTime,
a.productCount AS productCount,
a.presentCount AS presentCount,
a.cooFreeFlag AS cooFreeFlag,
a.cooFreeRate AS cooFreeRate,
a.cooFreeAmount AS cooFreeAmount,
a.confirmFlag AS confirmFlag,
a.clauseID AS clauseID,
a.clauseContent AS clauseContent,
a.clauseName AS clauseName,
a.updateDate AS updateDate,
a.freePostFlag AS freePostFlag,
a.freight AS freight,
a.userBeans AS userBeans,
a.delFlag AS delFlag,
a.onlinePayFlag AS onlinePayFlag,
a.payTime AS payTime,
a.splitFlag AS splitFlag,
(select sum(cop.totalAddedValueTax) from cm_order_product cop where cop.orderID = a.orderID) AS totalAddedValueTax,
a.preferential AS preferential,
a.closeReason AS closeReason,
a.receiptStatus as receiptStatus,
a.payStatus as payStatus,
a.sendOutStatus as sendOutStatus,
a.refundType as refundType,
a.postageOrderFlag AS postageOrderFlag,
a.promotionFullReduction AS promotionFullReduction,
a.promotionalGiftsCount AS promotionalGiftsCount,
a.affirmPaymentFlag AS affirmPaymentFlag,
a.rebateFlag AS rebateFlag,
a.zeroCostFlag AS zeroCostFlag,
a.organizeStoreId as organizeStoreId
UPDATE cm_order SET clauseContent = #{clauseContent},clauseName= #{clauseName}WHERE orderID = #{orderID}
INSERT INTO cm_order(
orderNo,
userID,
buyUserID,
shopOrderIDs,
orderSubmitType,
orderType,
secondHandOrderFlag,
status,
payFlag,
onlinePayFlag,
productTotalFee,
orderTotalFee,
payTotalFee,
balancePayFee,
discountFee,
spID,
mainSpID,
note,
clubID,
clubScanTime,
payWay,
orderSource,
orderTime,
productCount,
cooFreeFlag,
cooFreeRate,
cooFreeAmount,
confirmFlag,
clauseID,
clauseContent,
clauseName,
updateDate,
freePostFlag,
freight,
delFlag,
payTime,
splitFlag,
preferential,
confirmTime,
invoiceFlag,
postageOrderFlag,
sendOutStatus,
payableAmount,
promotionFullReduction,
promotionalGiftsCount,
affirmPaymentFlag,
rebateFlag,
payStatus,
zeroCostFlag
) VALUES (
#{orderNo},
#{userID},
#{buyUserID},
#{shopOrderIDs},
#{orderSubmitType},
#{orderType},
#{secondHandOrderFlag},
#{status},
#{payFlag},
#{onlinePayFlag},
#{productTotalFee},
#{orderTotalFee},
#{payTotalFee},
#{balancePayFee},
#{discountFee},
#{spID},
#{mainSpID},
#{note},
#{clubID},
#{clubScanTime},
#{payWay},
#{orderSource},
#{orderTime},
#{productCount},
#{cooFreeFlag},
#{cooFreeRate},
#{cooFreeAmount},
#{confirmFlag},
#{clauseID},
#{clauseContent},
#{clauseName},
#{updateDate},
#{freePostFlag},
#{freight},
#{delFlag},
#{payTime},
#{splitFlag},
#{preferential},
#{confirmTime},
#{invoiceFlag},
#{postageOrderFlag},
#{sendOutStatus},
#{payableAmount},
#{promotionFullReduction},
#{promotionalGiftsCount},
#{affirmPaymentFlag},
#{rebateFlag},
#{payStatus},
#{zeroCostFlag}
)
update cm_order
orderNo = #{orderNo,jdbcType=VARCHAR},
userID = #{userID,jdbcType=BIGINT},
organizeID = #{organizeID,jdbcType=INTEGER},
buyUserID = #{buyUserID,jdbcType=INTEGER},
shopOrderIDs = #{shopOrderIDs,jdbcType=VARCHAR},
orderSubmitType = #{orderSubmitType,jdbcType=CHAR},
orderType = #{orderType,jdbcType=CHAR},
secondHandOrderFlag = #{secondHandOrderFlag,jdbcType=CHAR},
status = #{status,jdbcType=CHAR},
productTotalFee = #{productTotalFee,jdbcType=DECIMAL},
orderTotalFee = #{orderTotalFee,jdbcType=DECIMAL},
payTotalFee = #{payTotalFee,jdbcType=DECIMAL},
payableAmount = #{payableAmount,jdbcType=DECIMAL},
balancePayFee = #{balancePayFee,jdbcType=DECIMAL},
discountFee = #{discountFee,jdbcType=DECIMAL},
spID = #{spID,jdbcType=BIGINT},
mainSpID = #{mainSpID,jdbcType=BIGINT},
clubID = #{clubID,jdbcType=BIGINT},
clubScanTime = #{clubScanTime,jdbcType=VARCHAR},
payWay = #{payWay,jdbcType=INTEGER},
orderSource = #{orderSource,jdbcType=CHAR},
orderTime = #{orderTime,jdbcType=TIMESTAMP},
productCount = #{productCount,jdbcType=INTEGER},
presentCount = #{presentCount,jdbcType=INTEGER},
cooFreeFlag = #{cooFreeFlag,jdbcType=CHAR},
cooFreeRate = #{cooFreeRate,jdbcType=INTEGER},
cooFreeAmount = #{cooFreeAmount,jdbcType=DECIMAL},
confirmFlag = #{confirmFlag,jdbcType=CHAR},
clauseID = #{clauseID,jdbcType=BIGINT},
clauseName = #{clauseName,jdbcType=VARCHAR},
freePostFlag = #{freePostFlag,jdbcType=CHAR},
freight = #{freight,jdbcType=DECIMAL},
delFlag = #{delFlag,jdbcType=CHAR},
note = #{note,jdbcType=LONGVARCHAR},
clauseContent = #{clauseContent,jdbcType=LONGVARCHAR},
payTime = #{payTime,jdbcType=LONGVARCHAR},
preferential = #{preferential ,jdbcType=DECIMAL},
discountFee = #{discountFee},
payFlag = #{payFlag},
onlinePayFlag = #{onlinePayFlag},
splitFlag = #{splitFlag},
closeReason = #{closeReason},
confirmTime = #{confirmTime},
invoiceFlag = #{invoiceFlag},
postageOrderFlag = #{postageOrderFlag},
sendOutStatus = #{sendOutStatus},
receiptStatus = #{receiptStatus},
payStatus = #{payStatus},
refundType = #{refundType},
promotionFullReduction = #{promotionFullReduction},
promotionalGiftsCount = #{promotionalGiftsCount},
affirmPaymentFlag = #{affirmPaymentFlag},
rebateFlag = #{rebateFlag},
zeroCostFlag = #{zeroCostFlag}
where orderID = #{orderID,jdbcType=BIGINT}
UPDATE cm_order_product SET
confirmFlag = 1
WHERE orderID = #{orderID}
UPDATE cm_order SET
status = #{status}
WHERE orderID = #{orderID}
update cm_order set payStatus = #{payStatus} where orderID = #{orderID}
INSERT INTO cm_promotions_order(
orderId,
promotionsId,
name,
description,
type,
mode,
touchPrice,
reducedPrice,
status,
beginTime,
endTime
) VALUES (
#{orderId},
#{promotionsId},
#{name},
#{description},
#{type},
#{mode},
#{touchPrice},
#{reducedPrice},
#{status},
#{beginTime},
#{endTime}
)
update cm_promotions_order
orderId = #{orderId},
promotionsId = #{promotionsId},
name = #{name},
description = #{description},
type = #{type},
mode = #{mode},
touchPrice = #{touchPrice},
reducedPrice = #{reducedPrice},
status = #{status},
beginTime = #{beginTime},
endTime = #{endTime}
where id = #{id}
update cm_order set payStatus = #{payStatus} ,zeroCostFlag = #{zeroCostFlag} where orderID = #{orderID}
DELETE FROM cm_promotions_order WHERE orderId = #{orderId}
UPDATE cm_order SET rebateFlag = 1 WHERE orderID = #{orderId}
DELETE FROM cm_qualification_image WHERE recordId = #{recordId}
INSERT INTO `cm_qualification_image` (
`recordId`, `image`)
VALUES
(#{recordId}, #{image});
DELETE FROM cm_qualification_file WHERE recordId = #{recordId}
INSERT INTO `cm_qualification_file` (
`recordId`, `fileName`, `ossName`
)
VALUES
(
#{recordId}, #{fileName}, #{ossName}
)
INSERT INTO `caimei`.`cm_short_link` (
`markId`, `shortLink`, `jumpLink`,
`createTime`
)
VALUES
(
#{markId}, #{shortLink}, #{url},
NOW()
)
UPDATE cm_sms_statistics SET sendNum = (sendNum + #{num}) WHERE markId = #{markId}