|
@@ -403,7 +403,7 @@
|
|
|
LEFT JOIN activity_user_mapper aum ON spo.id_ = aum.payment_order_id_ AND spo.user_id_ = aum.user_id_
|
|
|
LEFT JOIN vip_group_activity vga ON vga.id_ = aum.activity_id_
|
|
|
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)
|
|
|
+ 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) AND spo.tenant_id_ = 1
|
|
|
GROUP BY aum.activity_id_,aum.user_id_) c GROUP BY c.type_
|
|
|
</select>
|
|
|
<select id="count2022ActivityStatis" resultMap="DoubleEleven2021ActivityDto">
|
|
@@ -413,7 +413,7 @@
|
|
|
LEFT JOIN activity_user_mapper aum ON spo.id_ = aum.payment_order_id_ AND spo.user_id_ = aum.user_id_
|
|
|
LEFT JOIN vip_group_activity vga ON vga.id_ = aum.activity_id_
|
|
|
WHERE spo.group_type_ = 'ACTIVITY' AND spo.type_ = 'SMALL_CLASS_TO_BUY' AND spo.status_ = 'SUCCESS' AND spo.memo_ = '2022双十一活动购买'
|
|
|
- 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)
|
|
|
+ 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) AND spo.tenant_id_ = 1
|
|
|
GROUP BY aum.activity_id_,aum.user_id_) c GROUP BY c.type_
|
|
|
</select>
|
|
|
<resultMap id="DoubleEleven2021Dto" type="com.ym.mec.biz.dal.dto.DoubleEleven2021Dto">
|
|
@@ -425,16 +425,16 @@
|
|
|
<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)
|
|
|
+ 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) AND tenant_id_ = 1
|
|
|
</select>
|
|
|
<select id="countDoubleEleven2022Statis" resultMap="DoubleEleven2021Dto">
|
|
|
SELECT SUM(spo.expect_amount_) total_buy_amount_,COUNT(DISTINCT spo.user_id_) total_buy_num_ FROM student_payment_order spo
|
|
|
WHERE spo.group_type_ = 'ACTIVITY' AND spo.type_ = 'SMALL_CLASS_TO_BUY' AND spo.status_ = 'SUCCESS' AND spo.memo_ = '2022双十一活动购买'
|
|
|
- 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)
|
|
|
+ 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) AND spo.tenant_id_ = 1
|
|
|
</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)
|
|
|
+ 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) AND tenant_id_ = 1
|
|
|
</select>
|
|
|
<select id="countOrganGiveMemberNum" resultType="map">
|
|
|
SELECT organ_id_ 'key',COUNT(DISTINCT student_id_) 'value'
|
|
@@ -475,7 +475,7 @@
|
|
|
SELECT SUM(spo.expect_amount_) total_buy_amount_,COUNT(DISTINCT spo.user_id_) total_buy_num_,o.name_ organ_name_,o.id_ organ_id_
|
|
|
FROM organization o
|
|
|
LEFT JOIN student_payment_order spo ON o.id_ = spo.organ_id_ AND spo.type_ = 'DOUBLE_ELEVEN2021' AND spo.status_ = 'SUCCESS'
|
|
|
- WHERE o.id_ NOT IN (36,38,39,41,42,43,44,45,46,47,48,49,50,52,54,55,56,2,27,22,24)
|
|
|
+ WHERE o.id_ NOT IN (36,38,39,41,42,43,44,45,46,47,48,49,50,52,54,55,56,2,27,22,24) and spo.tenant_id_ = 1
|
|
|
<if test="organId != null">
|
|
|
AND o.id_ = #{organId}
|
|
|
</if>
|
|
@@ -486,7 +486,7 @@
|
|
|
FROM organization o
|
|
|
LEFT JOIN student_payment_order spo ON o.id_ = spo.organ_id_
|
|
|
AND spo.group_type_ = 'ACTIVITY' AND spo.type_ = 'SMALL_CLASS_TO_BUY' AND spo.status_ = 'SUCCESS' AND spo.memo_ = '2022双十一活动购买'
|
|
|
- WHERE o.id_ NOT IN (36,38,39,41,42,43,44,45,46,47,48,49,50,52,54,55,56,2,27,22,24)
|
|
|
+ WHERE o.id_ NOT IN (36,38,39,41,42,43,44,45,46,47,48,49,50,52,54,55,56,2,27,22,24) and spo.tenant_id_ = 1
|
|
|
<if test="organId != null">
|
|
|
AND o.id_ = #{organId}
|
|
|
</if>
|