Bläddra i källkod

头条-图片类型-修改为单账户

yangzian 3 år sedan
förälder
incheckning
a0ae0a154a

+ 0 - 4
module-job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/BytedanceMaterialsLoadJob.java

@@ -52,15 +52,11 @@ public class BytedanceMaterialsLoadJob {
                 }
             });
         });
-        //修改图片类型
-        imageInfoService.updateType(null);
         try {
             countDownLatch.await();
         } catch (InterruptedException e) {
             e.printStackTrace();
         }
-        //修改图片类型
-        //imageInfoService.updateType();
         XxlJobHelper.log("物料数据同步完成");
     }
 }

+ 4 - 5
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/mapper/xml/BytedanceImageInfoMapper.xml

@@ -48,9 +48,8 @@
         update
             ctop_bytedance_image_info
         set type = 3
-        where width < height and type is null or type = 2
-        and width = 1080 and height = 1920
-        <if test="projectId !=null and projectId != ''">
+        where width = 1080 and height = 1920
+        <if test="accountId !=null and accountId != ''">
             and account_id = #{accountId}
         </if>
 
@@ -62,7 +61,7 @@
         set type = 2
         where height &gt; width and type is null
         and (height between 1280 and 2560)  and (width between 720 and 1440)
-        <if test="projectId !=null and projectId != ''">
+        <if test="accountId !=null and accountId != ''">
             and account_id = #{accountId}
         </if>
     </update>
@@ -72,7 +71,7 @@
             set type = 1
         where height &lt; width and type is null
         and (width between 1280 and 2560)  and (height between 720 and 1440)
-        <if test="projectId !=null and projectId != ''">
+        <if test="accountId !=null and accountId != ''">
             and account_id = #{accountId}
         </if>
     </update>

+ 2 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceAdvertiserDataServiceImpl.java

@@ -644,6 +644,8 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         updaBytedanceVideoByAccountId(token);
         getVideoByPage(token, "", 1);
         getImageByPage(token, "", 1);
+        //修改图片类型
+        imageInfoService.updateType(token.getAccountId());
     }
 
     @Autowired