Ver código fonte

Merge branch 'dev-xym-fix2' of Server/long-article-manage into master

xueyiming 3 semanas atrás
pai
commit
ad84e8bad0

+ 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