|
@@ -112,9 +112,12 @@ public class CoreServiceImpl implements CoreService {
|
|
miniStgMap.put(accountId, miniprogramInsertTaskParam);
|
|
miniStgMap.put(accountId, miniprogramInsertTaskParam);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ List<PlanAccount> planAccounts = planAccountService.getPlanAccountByPlanId(longArticleSystemPlan.getId());
|
|
|
|
+ Set<String> accountIdSet = planAccounts.stream().map(PlanAccount::getAccountId).collect(Collectors.toSet());
|
|
for (LongArticleSystemPlanAccount account : longArticleSystemPlan.getAccountList()) {
|
|
for (LongArticleSystemPlanAccount account : longArticleSystemPlan.getAccountList()) {
|
|
PlanAccount planAccount = new PlanAccount();
|
|
PlanAccount planAccount = new PlanAccount();
|
|
String accountId = account.getId();
|
|
String accountId = account.getId();
|
|
|
|
+ accountIdSet.remove(accountId);
|
|
planAccount.setPlanId(longArticleSystemPlan.getId());
|
|
planAccount.setPlanId(longArticleSystemPlan.getId());
|
|
planAccount.setPlanName(longArticleSystemPlan.getName());
|
|
planAccount.setPlanName(longArticleSystemPlan.getName());
|
|
planAccount.setAccountId(accountId);
|
|
planAccount.setAccountId(accountId);
|
|
@@ -144,6 +147,13 @@ public class CoreServiceImpl implements CoreService {
|
|
planAccount.setPushType(longArticleSystemPlan.getPushType());
|
|
planAccount.setPushType(longArticleSystemPlan.getPushType());
|
|
planAccountService.saveOrUpdatePlanAccount(planAccount);
|
|
planAccountService.saveOrUpdatePlanAccount(planAccount);
|
|
}
|
|
}
|
|
|
|
+ if (CollectionUtils.isEmpty(accountIdSet)) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ for (String accountId : accountIdSet) {
|
|
|
|
+ planAccountService.delAccount(longArticleSystemPlan.getId(), accountId);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
if (CollectionUtils.isEmpty(planIdSet)) {
|
|
if (CollectionUtils.isEmpty(planIdSet)) {
|
|
return;
|
|
return;
|