|
@@ -92,31 +92,34 @@
|
|
|
END
|
|
|
) conversionPrice, -- 转化单价
|
|
|
|
|
|
- t2.url url, -- 视频url
|
|
|
+ -- t2.url url, -- 视频url
|
|
|
+
|
|
|
+ (SELECT url
|
|
|
+ FROM ctop_kuaishou_video_get
|
|
|
+ WHERE signature = t2.signature
|
|
|
+ LIMIT 1
|
|
|
+ ) url,
|
|
|
t2.signature signature -- 视频md5
|
|
|
from
|
|
|
ctop_user_allocation t1
|
|
|
left join
|
|
|
- ctop_kuaishou_report_hourly_creative_statistic t2
|
|
|
+ ctop_kuaishou_report_daily_creative t2
|
|
|
on t1.account_id = t2.account_id
|
|
|
+
|
|
|
<where>
|
|
|
<if test="userId != null">
|
|
|
and t1.user_id = #{userId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
- and t1.media_id = '2'
|
|
|
- and t1.account_id != ''
|
|
|
- and t2.signature != ''
|
|
|
+
|
|
|
<if test="startDate != null">
|
|
|
and t2.stat_date = #{startDate}
|
|
|
</if>
|
|
|
- <if test="statHour != null">
|
|
|
- and t2.stat_hour <= #{statHour}
|
|
|
- </if>
|
|
|
+ and t2.signature is not null
|
|
|
</where>
|
|
|
-
|
|
|
group by t2.signature
|
|
|
order by sum(t2.charge) desc
|
|
|
- limit 100
|
|
|
+ limit 100;
|
|
|
+
|
|
|
|
|
|
|
|
|
</select>
|
|
@@ -207,8 +210,6 @@
|
|
|
|
|
|
<select id="selectDailyByMap" parameterType="Map" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
|
|
-
|
|
|
-
|
|
|
SELECT
|
|
|
sum(t2.charge) cost, -- 花费
|
|
|
sum(t2.photo_show) photoShow, -- 封面曝光数
|