|
@@ -672,15 +672,15 @@ def idea_rank(user_id, start, end, page, page_size, order, order_by, book, chann
|
|
|
False as isCollected,
|
|
|
'' as labels,
|
|
|
download_path as downloadPath,
|
|
|
- now() as startDate,
|
|
|
- now() as endDate,
|
|
|
+ date_format( now(),'%Y-%m-%d %H:%i:%S') as startDate,
|
|
|
+ date_format( now(),'%Y-%m-%d %H:%i:%S') as endDate,
|
|
|
height,
|
|
|
width,
|
|
|
preview_url as media,
|
|
|
format as mediaFormat,
|
|
|
size as mediaSize,
|
|
|
if(click_count=0 or view_count =0 or view_count is null or click_count is null,0,click_count / view_count) as clickRate,
|
|
|
- min(width)/if(min(height),min(height),1) aspect_ratio
|
|
|
+ width/if(height,height,1) aspect_ratio,
|
|
|
cost as consumeAmount,
|
|
|
view_count as viewTimes,
|
|
|
click_count as clickTimes,
|
|
@@ -689,12 +689,12 @@ def idea_rank(user_id, start, end, page, page_size, order, order_by, book, chann
|
|
|
round(cost/click_count,2) cpc,
|
|
|
title,
|
|
|
description as article,
|
|
|
- now() as upateTime,
|
|
|
+ date_format( now(),'%Y-%m-%d %H:%i:%S') as upateTime,
|
|
|
null as updateBy,
|
|
|
if(is_video,2,1) as type,
|
|
|
- videoBitRate,
|
|
|
- videoFirstPage,
|
|
|
- videoLength,
|
|
|
+ video_bit_rate as videoBitRate,
|
|
|
+ null as videoFirstPage,
|
|
|
+ video_length as videoLength,
|
|
|
use_times as userTimes
|
|
|
from dw_image_cost_day
|
|
|
where replace (preview_url,' ,','') !=''
|