|
@@ -54,12 +54,17 @@
|
|
a.affirmPaymentFlag AS affirmPaymentFlag,
|
|
a.affirmPaymentFlag AS affirmPaymentFlag,
|
|
a.rebateFlag AS rebateFlag,
|
|
a.rebateFlag AS rebateFlag,
|
|
a.zeroCostFlag AS zeroCostFlag,
|
|
a.zeroCostFlag AS zeroCostFlag,
|
|
- a.couponAmount
|
|
|
|
|
|
+ a.couponAmount,
|
|
|
|
+ a.reductionAmount,
|
|
|
|
+ if(chcm.id is not null,1,0) as collageFlag,
|
|
|
|
+ chc.status as collageStatus
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="get" resultType="newOrder">
|
|
<select id="get" resultType="newOrder">
|
|
SELECT <include refid="columns"/>
|
|
SELECT <include refid="columns"/>
|
|
FROM cm_order a
|
|
FROM cm_order a
|
|
|
|
+ LEFT JOIN cm_hehe_collage_member chcm on a.orderID = chcm.orderId
|
|
|
|
+ LEFT JOIN cm_hehe_collage chc on chcm.collageId = chc.id
|
|
WHERE a.orderID = #{id}
|
|
WHERE a.orderID = #{id}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -106,22 +111,28 @@
|
|
co.sendOutStatus AS sendOutStatus,
|
|
co.sendOutStatus AS sendOutStatus,
|
|
co.receiptStatus AS receiptStatus,
|
|
co.receiptStatus AS receiptStatus,
|
|
co.productCount AS productCount,
|
|
co.productCount AS productCount,
|
|
- (SELECT IFNULL(sum(cop.shouldPayFee),0) FROM cm_order_product cop WHERE cop.orderId=co.orderID) AS "shouldPayProduct",
|
|
|
|
|
|
+ (SELECT IFNULL(sum(cop.shouldPayFee),0) FROM cm_order_product cop WHERE cop.orderId=co.orderID) AS
|
|
|
|
+ "shouldPayProduct",
|
|
co.status AS status,
|
|
co.status AS status,
|
|
co.splitFlag AS splitFlag,
|
|
co.splitFlag AS splitFlag,
|
|
co.postageOrderFlag AS postageOrderFlag,
|
|
co.postageOrderFlag AS postageOrderFlag,
|
|
(case when co.orderType = '0' then
|
|
(case when co.orderType = '0' then
|
|
- (select case status when 91 then '采美默认协销经理(官方账号)' else linkMan end from serviceprovider where serviceProviderID = co.spID)
|
|
|
|
|
|
+ (select case status when 91 then '采美默认协销经理(官方账号)' else linkMan end from serviceprovider where serviceProviderID
|
|
|
|
+ = co.spID)
|
|
else
|
|
else
|
|
''
|
|
''
|
|
end) AS spName,
|
|
end) AS spName,
|
|
- co.rebateFlag AS rebateFlag
|
|
|
|
|
|
+ co.rebateFlag AS rebateFlag,
|
|
|
|
+ if(chcm.id is not null,1,0) as collageFlag,
|
|
|
|
+ chc.status as collageStatus
|
|
FROM cm_order co
|
|
FROM cm_order co
|
|
LEFT JOIN bp_order_userinfo bou ON bou.orderId = co.orderID
|
|
LEFT JOIN bp_order_userinfo bou ON bou.orderId = co.orderID
|
|
LEFT JOIN user u ON u.userID = co.userID
|
|
LEFT JOIN user u ON u.userID = co.userID
|
|
LEFT JOIN cm_hehe_user c ON u.userID = c.userId
|
|
LEFT JOIN cm_hehe_user c ON u.userID = c.userId
|
|
LEFT JOIN cm_order_product cop ON co.orderID = cop.orderID
|
|
LEFT JOIN cm_order_product cop ON co.orderID = cop.orderID
|
|
LEFT JOIN product p ON cop.productID = p.productID
|
|
LEFT JOIN product p ON cop.productID = p.productID
|
|
|
|
+ LEFT JOIN cm_hehe_collage_member chcm on co.orderID = chcm.orderId
|
|
|
|
+ LEFT JOIN cm_hehe_collage chc on chcm.collageId = chc.id
|
|
<where>
|
|
<where>
|
|
co.orderType = 2
|
|
co.orderType = 2
|
|
<if test="orderID != null and orderID != ''">
|
|
<if test="orderID != null and orderID != ''">
|
|
@@ -258,5 +269,8 @@
|
|
WHERE
|
|
WHERE
|
|
orderId = #{orderID}
|
|
orderId = #{orderID}
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="findReductionTouchPrice" resultType="java.lang.Double">
|
|
|
|
+ select touchPrice from cm_hehe_reduction_user where orderId = #{orderID}
|
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|