|
@@ -135,7 +135,7 @@
|
|
IFNULL(ROUND(SUM(bclick)/SUM(aclick)*100,2),0) as actionRatio
|
|
IFNULL(ROUND(SUM(bclick)/SUM(aclick)*100,2),0) as actionRatio
|
|
FROM ctop_kuaishou_audience_report_daily_account
|
|
FROM ctop_kuaishou_audience_report_daily_account
|
|
where 1=1
|
|
where 1=1
|
|
- <if test="count > 0 ">
|
|
|
|
|
|
+ <if test="busTypes !=null and busTypes.size() == 9 ">
|
|
AND business_interest_tags != '其他'
|
|
AND business_interest_tags != '其他'
|
|
</if>
|
|
</if>
|
|
<if test="accountId != null">
|
|
<if test="accountId != null">
|
|
@@ -152,7 +152,7 @@
|
|
ORDER BY totalCost desc
|
|
ORDER BY totalCost desc
|
|
limit 9
|
|
limit 9
|
|
)
|
|
)
|
|
- <if test="count > 0 ">
|
|
|
|
|
|
+ <if test="busTypes !=null and busTypes.size() == 9 ">
|
|
union all
|
|
union all
|
|
SELECT
|
|
SELECT
|
|
statDate as statDate,
|
|
statDate as statDate,
|
|
@@ -187,20 +187,24 @@
|
|
AND stat_date <= #{endTime}
|
|
AND stat_date <= #{endTime}
|
|
</if>
|
|
</if>
|
|
AND audience_type = 'businessInterestTags'
|
|
AND audience_type = 'businessInterestTags'
|
|
|
|
+ AND business_interest_tags not in
|
|
|
|
+ <foreach collection="busTypes" item="item" index="index" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
GROUP BY business_interest_tags
|
|
GROUP BY business_interest_tags
|
|
- ORDER BY charge
|
|
|
|
- limit 0,#{count}
|
|
|
|
) t1
|
|
) t1
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
- <select id="querybusinessTypeCount" resultType="java.lang.Integer">
|
|
|
|
- SELECT count(1) FROM (
|
|
|
|
|
|
+ <select id="querybusinessTypeCount" resultType="java.lang.String">
|
|
|
|
+ SELECT businessInterestTags FROM (
|
|
SELECT
|
|
SELECT
|
|
- 1
|
|
|
|
|
|
+ sum(charge) as totalCost,
|
|
|
|
+ business_interest_tags as businessInterestTags
|
|
FROM ctop_kuaishou_audience_report_daily_account
|
|
FROM ctop_kuaishou_audience_report_daily_account
|
|
- where 1=1
|
|
|
|
|
|
+ where audience_type = 'businessInterestTags'
|
|
|
|
+ AND business_interest_tags != '其他'
|
|
<if test="accountId != null">
|
|
<if test="accountId != null">
|
|
and account_id = #{accountId}
|
|
and account_id = #{accountId}
|
|
</if>
|
|
</if>
|
|
@@ -210,10 +214,9 @@
|
|
<if test="endTime != null">
|
|
<if test="endTime != null">
|
|
AND stat_date <= #{endTime}
|
|
AND stat_date <= #{endTime}
|
|
</if>
|
|
</if>
|
|
- <if test="audienceType == 'businessInterestTags' ">
|
|
|
|
- AND audience_type = #{audienceType}
|
|
|
|
- GROUP BY business_interest_tags
|
|
|
|
- </if>
|
|
|
|
- ) as tt
|
|
|
|
|
|
+ GROUP BY business_interest_tags
|
|
|
|
+ ORDER BY totalCost desc
|
|
|
|
+ limit 9
|
|
|
|
+ ) t1
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|