|
@@ -39,6 +39,7 @@ public class PlanAccountServiceImpl implements PlanAccountService {
|
|
|
planAccountMapper.updateByPrimaryKeySelective(planAccount);
|
|
planAccountMapper.updateByPrimaryKeySelective(planAccount);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
public void saveOrUpdatePlanAccount(PlanAccount planAccount, LongArticleSystemPlanAccount account) {
|
|
public void saveOrUpdatePlanAccount(PlanAccount planAccount, LongArticleSystemPlanAccount account) {
|
|
|
PlanAccountExample example = new PlanAccountExample();
|
|
PlanAccountExample example = new PlanAccountExample();
|
|
|
example.createCriteria().andAccountIdEqualTo(planAccount.getAccountId())
|
|
example.createCriteria().andAccountIdEqualTo(planAccount.getAccountId())
|
|
@@ -57,6 +58,29 @@ public class PlanAccountServiceImpl implements PlanAccountService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void saveOrUpdateWuXianLiuPlanAccount(PlanAccount planAccount, LongArticleSystemPlanAccount account) {
|
|
|
|
|
+ PlanAccountExample example = new PlanAccountExample();
|
|
|
|
|
+ example.createCriteria().andAccountIdEqualTo(planAccount.getAccountId())
|
|
|
|
|
+ .andPlanIdEqualTo(planAccount.getPlanId())
|
|
|
|
|
+ .andCreateTimeGreaterThan(DateUtil.getThatDayDate())
|
|
|
|
|
+ .andStatusEqualTo(0)
|
|
|
|
|
+ .andIsDeleteEqualTo(0)
|
|
|
|
|
+ .andPublishOpenFlagEqualTo(1);
|
|
|
|
|
+
|
|
|
|
|
+ List<PlanAccount> planAccounts = planAccountMapper.selectByExample(example);
|
|
|
|
|
+ if (CollectionUtils.isEmpty(planAccounts)) {
|
|
|
|
|
+ planAccountMapper.insertSelective(planAccount);
|
|
|
|
|
+ if (PublishGzhPushTypeEnum.batch_group_publish.getVal().equals(planAccount.getPushType())) {
|
|
|
|
|
+ new Thread(() -> sortService.addBatchGroupGZH(account.getGhId(), account.getAppId())).start();
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ planAccount.setId(planAccounts.get(0).getId());
|
|
|
|
|
+ planAccount.setIsDelete(0);
|
|
|
|
|
+ planAccountMapper.updateByPrimaryKeySelective(planAccount);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public void saveOrUpdatePlan(Plan plan) {
|
|
public void saveOrUpdatePlan(Plan plan) {
|
|
|
PlanExample example = new PlanExample();
|
|
PlanExample example = new PlanExample();
|