Browse Source

增加例外设置字段

xueyiming 5 months ago
parent
commit
0393acc385

+ 2 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/PlanAccountService.java

@@ -19,6 +19,8 @@ public interface PlanAccountService {
 
     List<PlanAccount> getNormalPlanAccount(String accountId);
 
+    List<PlanAccount> getSpecialPlanAccount(String accountId);
+
     List<PlanAccount> getPlanAccount(String planId, String accountId);
 
     List<Plan> getPlanList();

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

@@ -852,6 +852,10 @@ public class CoreServiceImpl implements CoreService {
 
         //额外发送
         for (AccountSpecialSettings accountSpecialSetting : sendAccountSpecialSettings) {
+            List<PlanAccount> specialPlanAccount = planAccountService.getSpecialPlanAccount(accountSpecialSetting.getAccountId());
+            if (!CollectionUtils.isEmpty(specialPlanAccount)) {
+                continue;
+            }
             List<PlanAccount> planAccountList = planAccountService.getNormalPlanAccount(accountSpecialSetting.getAccountId());
             if (CollectionUtils.isEmpty(planAccountList)) {
                 continue;

+ 9 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/PlanAccountServiceImpl.java

@@ -83,6 +83,15 @@ public class PlanAccountServiceImpl implements PlanAccountService {
         return planAccountMapper.selectByExample(example);
     }
 
+    @Override
+    public List<PlanAccount> getSpecialPlanAccount(String accountId) {
+        PlanAccountExample example = new PlanAccountExample();
+        example.createCriteria().andCreateTimeGreaterThan(DateUtil.getThatDayDate())
+                .andAccountIdEqualTo(accountId)
+                .andIsSpecialSettingEqualTo(1);
+        return planAccountMapper.selectByExample(example);
+    }
+
     public List<PlanAccount> getPlanAccount(String planId, String accountId) {
         PlanAccountExample example = new PlanAccountExample();
         example.createCriteria().andCreateTimeGreaterThan(DateUtil.getThatDayDate())