瀏覽代碼

修改同步素材逻辑

yumeng 2 年之前
父節點
當前提交
c777e13465

+ 19 - 11
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/MaterialUploadTaskMapper.xml

@@ -10,17 +10,25 @@
 	</update>
 
     <select id="getMd5List" resultType="java.lang.String">
-    SELECT
-	signature
-	FROM
-	ctop_material_upload_task
-	WHERE
-	task_status = 0
-	GROUP BY
-	signature
-	ORDER BY
-	create_time ASC
-	LIMIT 15
+   select t.signature
+from (select t1.signature
+      from (SELECT signature
+            FROM ctop_material_upload_task
+            WHERE task_status = 0
+              and media_id in (2, 4)
+            group by signature
+            ORDER BY create_time ASC
+            LIMIT 5) t1
+      union all
+      select t2.signature
+      from (SELECT signature
+            FROM ctop_material_upload_task
+            WHERE task_status = 0
+              and media_id in (1, 3)
+            group by signature
+            ORDER BY create_time ASC
+            limit 5) t2) t
+group by t.signature
     </select>
     <select id="getHostingIdList" resultType="java.lang.Long">
 		select  id  from ctop_kuaishou_hosting_task