Просмотр исходного кода

无限发表 - 推送草稿箱

wangyunpeng 1 месяц назад
Родитель
Сommit
b085148883

+ 1 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/common/enums/PublishGzhPushTypeEnum.java

@@ -12,6 +12,7 @@ public enum PublishGzhPushTypeEnum {
     robopost(4, "自动发布"),
     batch_group_publish(5, "分组群发"),
     trigger_push(6, "触发推送"),
+    INFINITE_PUBLISH_PUSH_DRAFT(7, "无限发表-推送草稿箱"),
 
     other(999, "其他"),
     ;

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

@@ -15,8 +15,6 @@ import com.tzld.piaoquan.longarticle.model.bo.VideoDetail;
 import com.tzld.piaoquan.longarticle.model.dto.AuditContentRequest;
 import com.tzld.piaoquan.longarticle.model.dto.MiniprogramCardRequest;
 import com.tzld.piaoquan.longarticle.model.dto.PublishArticleData;
-import com.tzld.piaoquan.longarticle.model.po.crawler.ArticleUseGroup;
-import com.tzld.piaoquan.longarticle.model.po.crawler.ArticleUseGroupExample;
 import com.tzld.piaoquan.longarticle.model.po.crawler.FwhDailyPublishDetail;
 import com.tzld.piaoquan.longarticle.model.po.longarticle.*;
 import com.tzld.piaoquan.longarticle.model.vo.*;
@@ -37,11 +35,9 @@ import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
 import java.math.BigDecimal;
-import java.time.LocalDate;
 import java.time.LocalTime;
 import java.util.*;
 import java.util.concurrent.*;
-import java.util.function.Function;
 import java.util.stream.Collectors;
 
 @Slf4j
@@ -235,7 +231,8 @@ public class CoreServiceImpl implements CoreService {
                 if (!CollectionUtils.isEmpty(specialAccountIds) && specialAccountIds.contains(planAccount.getAccountId())) {
                     planAccount.setSpecialNotSend(SpecialNotSendEnum.NOT_SEND.getStatusCode());
                 }
-                if (Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.auto_publish.getVal())
+                if ((Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.auto_publish.getVal())
+                        || (Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.INFINITE_PUBLISH_PUSH_DRAFT.getVal())))
                         && StringUtils.isNotEmpty(planAccount.getPublishWindowStart())
                         && StringUtils.isNotEmpty(planAccount.getPublishWindowEnd())) {
                     planAccountService.saveOrUpdateWuXianLiuPlanAccount(planAccount, account);
@@ -817,7 +814,8 @@ public class CoreServiceImpl implements CoreService {
         gzhPushParam.setPushType(planAccount.getPushType());
         gzhPushParam.setPushScheduleTimestamp(System.currentTimeMillis());
         if (planAccount.getIsSpecialSetting() != 1 && StringUtils.isNotEmpty(planAccount.getPublishPushTime())
-                && !planAccount.getPushType().equals(PublishGzhPushTypeEnum.auto_publish.getVal())) {
+                && !planAccount.getPushType().equals(PublishGzhPushTypeEnum.auto_publish.getVal())
+                && !planAccount.getPushType().equals(PublishGzhPushTypeEnum.INFINITE_PUBLISH_PUSH_DRAFT.getVal())) {
             String dateTimeStr = TimeZoneUtil.todayYMD(TimeZoneUtil.Timezone.china) + " " + planAccount.getPublishPushTime();
             gzhPushParam.setPushScheduleTimestamp(TimeZoneUtil.getDateStrTimestamp(dateTimeStr, "yyyy-MM-dd HH:mm:ss", TimeZoneUtil.Timezone.china));
         } else {
@@ -1052,7 +1050,8 @@ public class CoreServiceImpl implements CoreService {
                 }
                 if (Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.auto_group_publish.getVal()) ||
                         Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.auto_publish.getVal()) ||
-                        Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.batch_group_publish.getVal())) {
+                        Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.batch_group_publish.getVal()) ||
+                        Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.INFINITE_PUBLISH_PUSH_DRAFT.getVal())) {
                     planAccountService.updateStatus(2, planAccountId);
                 }
                 if (Objects.equals(planAccount.getPushType(), PublishGzhPushTypeEnum.batch_group_publish.getVal())