소스 검색

例外设置增加apollo配置支持提前多天发送

xueyiming 3 주 전
부모
커밋
785dae9fcc
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/AccountServiceImpl.java

+ 5 - 5
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/AccountServiceImpl.java

@@ -74,11 +74,11 @@ public class AccountServiceImpl implements AccountService {
 
     @Override
     public boolean isSendSpecialSettings(String accountId) {
-        String dateString = DateUtil.getTomorrowDateString();
-        AccountSpecialSettingsExample example = new AccountSpecialSettingsExample();
-        example.createCriteria().andEffectiveDateEqualTo(dateString)
-                .andAccountIdEqualTo(accountId).andIsDeleteEqualTo(0).andOpenStatusEqualTo(1);
-        return accountSpecialSettingsMapper.countByExample(example) > 0;
+        List<AccountSpecialSettings> sendAccountSpecialSettings = getSendAccountSpecialSettings();
+        if (CollectionUtils.isEmpty(sendAccountSpecialSettings)) {
+            return false;
+        }
+        return sendAccountSpecialSettings.stream().anyMatch(settings -> settings.getAccountId().equals(accountId));
     }
 
     @Override