Explorar el Código

优化上传剧目推送

zhaotx hace 1 año
padre
commit
8c7541324a

+ 7 - 3
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/service/impl/BytedanceProductUpdateServiceImpl.java

@@ -552,12 +552,14 @@ public class BytedanceProductUpdateServiceImpl implements IBytedanceProductUpdat
                 info.add("上传短剧成功,videoId: " + videoId + ", 剧目名称: " + vi.getString("name") + ", albumId: " + albumId);
                 info.add("上传短剧成功,videoId: " + videoId + ", 剧目名称: " + vi.getString("name") + ", albumId: " + albumId);
             }
             }
         }
         }
-        FeishuRobotUtil.sendTextToWebhook(StringUtils.join(info, "\n"), HOOK_URL);
+        if (info.size()>1){
+            FeishuRobotUtil.sendTextToWebhook(StringUtils.join(info, "\n"), HOOK_URL);
+        }
     }
     }
 
 
     public void refreshAlbumStatus() throws IOException {
     public void refreshAlbumStatus() throws IOException {
         List<String> info = new ArrayList<>();
         List<String> info = new ArrayList<>();
-        info.add("短剧审核状态更新通知");
+        info.add("仅微小短剧审核状态更新通知");
         JSONObject developerAccount = bytedanceProductUpdateMapper.getDeveloperAccount();
         JSONObject developerAccount = bytedanceProductUpdateMapper.getDeveloperAccount();
         Long app_id = developerAccount.getLong("app_id");
         Long app_id = developerAccount.getLong("app_id");
         String app_secret = developerAccount.getString("app_secret");
         String app_secret = developerAccount.getString("app_secret");
@@ -609,7 +611,9 @@ public class BytedanceProductUpdateServiceImpl implements IBytedanceProductUpdat
                 }
                 }
             }
             }
         }
         }
-        FeishuRobotUtil.sendTextToWebhook(StringUtils.join(info, "\n"), HOOK_URL);
+        if (info.size()>1){
+            FeishuRobotUtil.sendTextToWebhook(StringUtils.join(info, "\n"), HOOK_URL);
+        }
     }
     }