yumeng 5 年之前
父节点
当前提交
363a88b07f

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java

@@ -131,7 +131,7 @@ public class TestController {
                 public void run() {
                 public void run() {
                     try {
                     try {
                         //  kuaishouInterfaceService.getCreativeList(token, null, null);
                         //  kuaishouInterfaceService.getCreativeList(token, null, null);
-                        kuaishouInterfaceService.getVideoList(token, null, null);
+                        kuaishouInterfaceService.getVideoList2(token, null, null,1);
                         //3: 获取图片信息数据
                         //3: 获取图片信息数据
                         kuaishouInterfaceService.getImageList(token, null, null);
                         kuaishouInterfaceService.getImageList(token, null, null);
                         Thread.sleep(1 * 1000);
                         Thread.sleep(1 * 1000);

+ 1 - 2
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaiShouVideoGet.java

@@ -71,8 +71,7 @@ public class KuaiShouVideoGet {
     /**
     /**
      * 视频首帧图片链接
      * 视频首帧图片链接
      */
      */
-    @Excel(name = "视频MD5值", width = 15)
-    @ApiModelProperty(value = "视频MD5值")
+
     private String signature;
     private String signature;
 
 
 
 

+ 9 - 5
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouVideoGetMapper.xml

@@ -11,12 +11,14 @@
         url,
         url,
         cover_url,
         cover_url,
         material_type,
         material_type,
+        signature,
         create_time,
         create_time,
-        update_time,
-        signature)
+        update_time
+       )
         values
         values
         <foreach collection="videos" item="video" separator=",">
         <foreach collection="videos" item="video" separator=",">
-            (#{video.id},
+            (
+            #{video.id},
             #{video.accountId},
             #{video.accountId},
             #{video.photoId},
             #{video.photoId},
             #{video.width},
             #{video.width},
@@ -24,9 +26,11 @@
             #{video.url},
             #{video.url},
             #{video.coverUrl},
             #{video.coverUrl},
             #{video.materialType},
             #{video.materialType},
+            #{video.signature},
             #{video.createTime},
             #{video.createTime},
-            #{video.updateTime},
-            #{video.signature})
+            #{video.updateTime}
+
+            )
         </foreach>
         </foreach>
     </insert>
     </insert>
 </mapper>
 </mapper>

+ 5 - 2
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java

@@ -306,8 +306,9 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                     continue;
                     continue;
                 }
                 }
                 var kuaiShouVideoGet = JSONObject.toJavaObject(detailJson, KuaiShouVideoGet.class);
                 var kuaiShouVideoGet = JSONObject.toJavaObject(detailJson, KuaiShouVideoGet.class);
-                kuaiShouVideoGet.setAccountId(token.getAccountId());
                 kuaiShouVideoGet.setId(token.getAccountId() + kuaiShouVideoGet.getSignature());
                 kuaiShouVideoGet.setId(token.getAccountId() + kuaiShouVideoGet.getSignature());
+                kuaiShouVideoGet.setAccountId(token.getAccountId());
+
                 kuaiShouVideoGet.setCreateTime(new Date());
                 kuaiShouVideoGet.setCreateTime(new Date());
                 kuaiShouVideoGet.setUpdateTime(new Date());
                 kuaiShouVideoGet.setUpdateTime(new Date());
                 Integer type = MaterialEnum.getTypeBySize(kuaiShouVideoGet.getWidth(), kuaiShouVideoGet.getHeight());
                 Integer type = MaterialEnum.getTypeBySize(kuaiShouVideoGet.getWidth(), kuaiShouVideoGet.getHeight());
@@ -315,9 +316,10 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                     kuaiShouVideoGet.setMaterialType(type);
                     kuaiShouVideoGet.setMaterialType(type);
                 }
                 }
 
 
+           //     kuaiShouVideoGetService.saveOrUpdate(kuaiShouVideoGet);
                 videoGets.add(kuaiShouVideoGet);
                 videoGets.add(kuaiShouVideoGet);
             }
             }
-            kuaiShouVideoGetService.replaceBatch(videoGets);
+           kuaiShouVideoGetService.replaceBatch(videoGets);
             getVideoListByPage(token, startDate, endDate, page + 1);
             getVideoListByPage(token, startDate, endDate, page + 1);
 
 
         } catch (Exception e) {
         } catch (Exception e) {
@@ -3248,6 +3250,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             //
             //
             String result = HttpUtils.httpPostRequest(url, param, headers);
             String result = HttpUtils.httpPostRequest(url, param, headers);
 
 
+            System.err.println(result);
             JSONObject resultJson = JSONObject.parseObject(result);
             JSONObject resultJson = JSONObject.parseObject(result);
             Integer code = resultJson.getInteger("code");
             Integer code = resultJson.getInteger("code");
             String message = resultJson.getString("message");
             String message = resultJson.getString("message");