|
@@ -175,6 +175,7 @@ public class CoreServiceImpl implements CoreService {
|
|
|
}
|
|
}
|
|
|
retryCount++;
|
|
retryCount++;
|
|
|
}
|
|
}
|
|
|
|
|
+ allLongArticleSystemPlans = allLongArticleSystemPlans.stream().filter(o -> o.getId().equals("20260409030333343928599")).collect(Collectors.toList());
|
|
|
for (LongArticleSystemPlan longArticleSystemPlan : allLongArticleSystemPlans) {
|
|
for (LongArticleSystemPlan longArticleSystemPlan : allLongArticleSystemPlans) {
|
|
|
Plan plan = createPlan(longArticleSystemPlan);
|
|
Plan plan = createPlan(longArticleSystemPlan);
|
|
|
planAccountService.saveOrUpdatePlan(plan);
|
|
planAccountService.saveOrUpdatePlan(plan);
|
|
@@ -541,11 +542,13 @@ public class CoreServiceImpl implements CoreService {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
if (planAccount.getPublishTimeInterval() != null) {
|
|
if (planAccount.getPublishTimeInterval() != null) {
|
|
|
|
|
+ List<PlanAccount> planAccountList = getTodayPlanAccountList(planAccount.getPlanId(), planAccount.getAccountId());
|
|
|
|
|
+ List<Long> planAccountIds = planAccountList.stream().map(PlanAccount::getId).collect(Collectors.toList());
|
|
|
// 找到该账号最近发布的内容,判断时间间隔
|
|
// 找到该账号最近发布的内容,判断时间间隔
|
|
|
PublishContentExample example = new PublishContentExample();
|
|
PublishContentExample example = new PublishContentExample();
|
|
|
example.createCriteria().andStatusIn(Arrays.asList(1, 2))
|
|
example.createCriteria().andStatusIn(Arrays.asList(1, 2))
|
|
|
.andCreateTimeGreaterThan(DateUtil.getThatDayDate())
|
|
.andCreateTimeGreaterThan(DateUtil.getThatDayDate())
|
|
|
- .andPlanAccountIdEqualTo(planAccount.getId());
|
|
|
|
|
|
|
+ .andPlanAccountIdIn(planAccountIds);
|
|
|
example.setOrderByClause("create_time desc");
|
|
example.setOrderByClause("create_time desc");
|
|
|
List<PublishContent> publishContents = publishContentMapper.selectByExample(example);
|
|
List<PublishContent> publishContents = publishContentMapper.selectByExample(example);
|
|
|
if (!CollectionUtils.isEmpty(publishContents)) {
|
|
if (!CollectionUtils.isEmpty(publishContents)) {
|
|
@@ -653,6 +656,13 @@ public class CoreServiceImpl implements CoreService {
|
|
|
return flag;
|
|
return flag;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private List<PlanAccount> getTodayPlanAccountList(String planId, String accountId) {
|
|
|
|
|
+ PlanAccountExample example = new PlanAccountExample();
|
|
|
|
|
+ example.createCriteria().andPlanIdEqualTo(planId).andAccountIdEqualTo(accountId)
|
|
|
|
|
+ .andCreateTimeGreaterThan(DateUtil.getThatDayDate());
|
|
|
|
|
+ return planAccountMapper.selectByExample(example);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void core() throws InterruptedException {
|
|
public void core() throws InterruptedException {
|
|
@@ -692,6 +702,7 @@ public class CoreServiceImpl implements CoreService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
public void operatePlanAccount(PlanAccount planAccount) {
|
|
public void operatePlanAccount(PlanAccount planAccount) {
|
|
|
boolean flag = checkPlanAccount(planAccount);
|
|
boolean flag = checkPlanAccount(planAccount);
|
|
|
log.info("planAccount={}, flag={}", planAccount, flag);
|
|
log.info("planAccount={}, flag={}", planAccount, flag);
|