|
@@ -69,7 +69,7 @@
|
|
t1.trade_type as 'tradeType',
|
|
t1.trade_type as 'tradeType',
|
|
t1.item_run as 'itemRun',
|
|
t1.item_run as 'itemRun',
|
|
IFNULL(sum(t2.charge),0.00) as 'charge',
|
|
IFNULL(sum(t2.charge),0.00) as 'charge',
|
|
- CONCAT(t1.start_month,' ~ ',t1.end_month) as 'time',
|
|
|
|
|
|
+ CONCAT_WS(' ~ ',t1.start_month,t1.end_month) AS 'time',
|
|
IFNULL(t3.realname,'-') as 'user',
|
|
IFNULL(t3.realname,'-') as 'user',
|
|
IFNULL(t4.videoCount ,'-') as 'videoCount'
|
|
IFNULL(t4.videoCount ,'-') as 'videoCount'
|
|
FROM ctop_product_material t1
|
|
FROM ctop_product_material t1
|
|
@@ -89,7 +89,7 @@
|
|
</where>
|
|
</where>
|
|
GROUP BY signature
|
|
GROUP BY signature
|
|
) t2 ON t1.signature = t2.signature
|
|
) t2 ON t1.signature = t2.signature
|
|
- LEFT JOIN (select id, realname from sys_user) t3 on t1.user_id =t3.id
|
|
|
|
|
|
+ LEFT JOIN (select id, realname from sys_user) t3 on t1.uploader_id =t3.id
|
|
LEFT JOIN ( SELECT product_id, trade_name, sum(1)AS 'videoCount' FROM ctop_product_material
|
|
LEFT JOIN ( SELECT product_id, trade_name, sum(1)AS 'videoCount' FROM ctop_product_material
|
|
WHERE video_url is not null
|
|
WHERE video_url is not null
|
|
GROUP BY product_id,trade_name) t4 ON t1.product_id = t4.product_id AND t1.trade_name= t4.trade_name
|
|
GROUP BY product_id,trade_name) t4 ON t1.product_id = t4.product_id AND t1.trade_name= t4.trade_name
|
|
@@ -143,7 +143,7 @@
|
|
AND stat_date <= DATE_FORMAT(#{endDate}, '%Y%m%d')
|
|
AND stat_date <= DATE_FORMAT(#{endDate}, '%Y%m%d')
|
|
GROUP BY signature
|
|
GROUP BY signature
|
|
) t2 ON t1.signature = t2.signature
|
|
) t2 ON t1.signature = t2.signature
|
|
- LEFT JOIN (select id, realname from sys_user) t3 on t1.user_id = t3.id
|
|
|
|
|
|
+ LEFT JOIN (select id, realname from sys_user) t3 on t1.uploader_id = t3.id
|
|
WHERE video_url is not null
|
|
WHERE video_url is not null
|
|
and product_id = #{productId}
|
|
and product_id = #{productId}
|
|
and trade_name = #{tradeName}
|
|
and trade_name = #{tradeName}
|
|
@@ -180,7 +180,7 @@
|
|
</where>
|
|
</where>
|
|
GROUP BY signature
|
|
GROUP BY signature
|
|
) t2 ON t1.signature = t2.signature AND t1.product_id=t2.product_id
|
|
) t2 ON t1.signature = t2.signature AND t1.product_id=t2.product_id
|
|
- LEFT JOIN (select id, realname from sys_user) t3 on t1.user_id =t3.id
|
|
|
|
|
|
+ LEFT JOIN (select id, realname from sys_user) t3 on t1.uploader_id =t3.id
|
|
where video_url is not null
|
|
where video_url is not null
|
|
<if test="productId!=null">
|
|
<if test="productId!=null">
|
|
and t1.product_id = #{productId}
|
|
and t1.product_id = #{productId}
|