瀏覽代碼

增加判空

xueyiming 7 月之前
父節點
當前提交
04afc98506

+ 4 - 1
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/CoreServiceImpl.java

@@ -596,11 +596,14 @@ public class CoreServiceImpl implements CoreService {
             } else {
                 gzhPushParam.setPushScheduleTimestamp(System.currentTimeMillis());
             }
-            gzhPushParam.setPushContentList(pushContentList);
+            if (CollectionUtils.isEmpty(pushContentList)) {
+                continue;
+            }
             if (Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.auto_group_publish.getVal())
                     && pushContentList.size() < planAccount.getPublishPreMinNum()) {
                 continue;
             }
+            gzhPushParam.setPushContentList(pushContentList);
             log.info("gzhPushParam={}", gzhPushParam);
             String pushId = aigcService.createPushTask(gzhPushParam);
             log.info("pushId = {}", pushId);