|
@@ -335,12 +335,28 @@
|
|
|
<resultMap id="DoubleEleven2021ActivityDto" type="com.ym.mec.biz.dal.dto.DoubleEleven2021ActivityDto">
|
|
|
<result property="buyNum" column="buy_num_"/>
|
|
|
<result property="buyAmount" column="buy_amount_"/>
|
|
|
+ <result property="type" column="type_"/>
|
|
|
</resultMap>
|
|
|
- <select id="countActivityStatis" resultType="com.ym.mec.biz.dal.dto.DoubleEleven2021ActivityDto">
|
|
|
- SELECT SUM(spo.expect_amount_) buy_amount_,COUNT(DISTINCT aum.user_id_) buy_num_,aum.activity_id_
|
|
|
+ <select id="countActivityStatis" resultMap="DoubleEleven2021ActivityDto">
|
|
|
+ SELECT SUM(aum.actual_price_) buy_amount_,COUNT(DISTINCT aum.user_id_) buy_num_,
|
|
|
+ CASE WHEN aum.activity_id_ = 215 THEN 2 WHEN aum.activity_id_ = 216 THEN 1
|
|
|
+ WHEN aum.activity_id_ = 217 THEN 4 WHEN aum.activity_id_ = 218 THEN 3 ELSE 5 END type_
|
|
|
FROM student_payment_order spo
|
|
|
LEFT JOIN activity_user_mapper aum ON spo.id_ = aum.payment_order_id_ AND spo.user_id_ = aum.user_id_
|
|
|
- WHERE spo.type_ = 'DOUBLE_ELEVEN2021' AND spo.status_ = 'SUCCESS'
|
|
|
+ WHERE spo.type_ = 'DOUBLE_ELEVEN2021' AND spo.status_ = 'SUCCESS' AND spo.organ_id_ NOT IN (36,38,39,41,42,43,44,45,46,47,48,49,50,52,54,55,56,2,27,22,24)
|
|
|
GROUP BY aum.activity_id_,aum.user_id_
|
|
|
</select>
|
|
|
+ <resultMap id="DoubleEleven2021Dto" type="com.ym.mec.biz.dal.dto.DoubleEleven2021Dto">
|
|
|
+ <result property="totalBuyAmount" column="total_buy_amount_"/>
|
|
|
+ <result property="totalBuyNum" column="total_buy_num_"/>
|
|
|
+ </resultMap>
|
|
|
+ <select id="countDoubleEleven2021Statis" resultMap="DoubleEleven2021Dto">
|
|
|
+ SELECT SUM(expect_amount_) total_buy_amount_,COUNT(DISTINCT user_id_) total_buy_num_ FROM student_payment_order
|
|
|
+ WHERE type_ = 'DOUBLE_ELEVEN2021' AND status_ = 'SUCCESS'
|
|
|
+ AND organ_id_ NOT IN (36,38,39,41,42,43,44,45,46,47,48,49,50,52,54,55,56,2,27,22,24)
|
|
|
+ </select>
|
|
|
+ <select id="countGiveMemberNum" resultType="java.lang.Integer">
|
|
|
+ SELECT COUNT(DISTINCT student_id_) FROM cloud_teacher_order WHERE remark_ = '双十一活动赠送会员'
|
|
|
+ AND organ_id_ NOT IN (36,38,39,41,42,43,44,45,46,47,48,49,50,52,54,55,56,2,27,22,24)
|
|
|
+ </select>
|
|
|
</mapper>
|