|
@@ -1999,4 +1999,55 @@ sum(click) as totalClick, if(sum(a.impression) > 0,sum(a.click)/sum(a.impression
|
|
group by b.name
|
|
group by b.name
|
|
limit #{pager.offset}, #{pager.limit}
|
|
limit #{pager.offset}, #{pager.limit}
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+ <!-- 没有关联媒体的场景报表导出 -->
|
|
|
|
+ <select id="queryPlaceNameExt" parameterType="java.util.Map" resultType="com.cloudcross.ssp.model.DeliverAnalysis">
|
|
|
|
+ select d.name placeName,SUM(a.impression) impression, SUM(a.click) click,100*SUM(a.click)/SUM(a.impression) clickRate,SUM(a.visit) visit,
|
|
|
|
+ 100*SUM(a.visit)/SUM(a.click) visitRate,SUM(a.conversion) conversion,100*SUM(a.conversion)/SUM(a.visit) conversionRate,SUM(a.ecpm) as ecpm, SUM(a.consume) consume
|
|
|
|
+ from t_rpt_adv_place a,t_place b,t_place_class c,t_place_class_info d,t_account e where a.place_id = b.id and b.id = c.place_id and c.place_id = d.id and e.advertiser_id = a.advertiser_id
|
|
|
|
+ <if test="agentId != null">
|
|
|
|
+ and e.agent_id = #{agentId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="advertiserId != null">
|
|
|
|
+ and a.advertiser_id = #{advertiserId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="orderId != null">
|
|
|
|
+ and a.order_id = #{orderId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="campaignId != null">
|
|
|
|
+ and a.campaign_id = #{campaignId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="adGroupId != null">
|
|
|
|
+ and a.adgroup_id = #{adGroupId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startDate != null and endDate != null">
|
|
|
|
+ and a.date >= #{startDate} and a.date <= #{endDate}
|
|
|
|
+ </if>
|
|
|
|
+ group by d.name
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="queryPlaceNameWithOperatorExt" parameterType="java.util.Map" resultType="com.cloudcross.ssp.model.DeliverAnalysis">
|
|
|
|
+ select b.name placeName,SUM(a.impression) impression, SUM(a.click) click,100*SUM(a.click)/SUM(a.impression) clickRate,SUM(a.visit) visit,
|
|
|
|
+ 100*SUM(a.visit)/SUM(a.click) visitRate,SUM(a.conversion) conversion,100*SUM(a.conversion)/SUM(a.visit) conversionRate,SUM(a.ecpm) as ecpm, SUM(a.consume) consume
|
|
|
|
+ from t_rpt_adv_place a,t_place_operator b,t_account c where a.place_id = b.place_id and a.advertiser_id = c.advertiser_id
|
|
|
|
+ <if test="agentId != null">
|
|
|
|
+ and c.agent_id = #{agentId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="advertiserId != null">
|
|
|
|
+ and a.advertiser_id = #{advertiserId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="orderId != null">
|
|
|
|
+ and a.order_id = #{orderId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="campaignId != null">
|
|
|
|
+ and a.campaign_id = #{campaignId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="adGroupId != null">
|
|
|
|
+ and a.adgroup_id = #{adGroupId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startDate != null and endDate != null">
|
|
|
|
+ and a.date >= #{startDate} and a.date <= #{endDate}
|
|
|
|
+ </if>
|
|
|
|
+ group by b.name
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|