瀏覽代碼

xuanpin库

zhaoxian 3 年之前
父節點
當前提交
d1ebd6e712

+ 4 - 4
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/material/mapper/xml/ProductMaterialMapper.xml

@@ -128,7 +128,7 @@
     </select>
 
     <select id="videoList" resultType="com.alibaba.fastjson.JSONObject">
-        SELECT id,
+        SELECT t1.id,
                t1.product_name as 'productName',
                t1.trade_name as 'tradeName',
                t1.video_url as 'videoUrl',
@@ -167,7 +167,7 @@
         IFNULL(t3.realname, '-') as 'user'
         FROM ctop_product_material t1
         LEFT JOIN
-        ( SELECT signature , sum(charge) as 'charge' FROM application.kuaishou_material_video_report_daily_dw
+        ( SELECT  product_id,signature , sum(charge) as 'charge' FROM application.kuaishou_material_video_report_daily_dw
         <where>
             <if test="productId!=null">
                 and product_id = #{productId}
@@ -180,7 +180,7 @@
             </if>
         </where>
         GROUP BY signature
-        ) t2 ON t1.signature = t2.signature
+        ) 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
         where video_url!=''
         <if test="productId!=null">
@@ -198,7 +198,7 @@
         <if test="itemRun!=null">
             and t1.item_run = #{itemRun}
         </if>
-        group by t1.signature
+        group by t1.product_id,	t1.product_name ,t1.signature
     </select>
 
 </mapper>