chenlei1231 3 дней назад
Родитель
Сommit
627435de4b

+ 11 - 11
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/impl/AdwebEnquiryServiceImpl.java

@@ -1695,30 +1695,30 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
 
   /** 获取站点黑名单IP列表 */
   private List<String> getSiteBlackIpList(AdwebSite adwebSite) {
-    String siteBlackIpRedisKey = SiteWhiteIpListKey + "::" + adwebSite.getId();
+    String siteBlackIpRedisKey = SiteBlackIpKey + "::" + adwebSite.getId();
 
-    List<String> siteWhiteIpList = getListFromRedis(siteBlackIpRedisKey);
+    List<String> siteBlackIpList = getListFromRedis(siteBlackIpRedisKey);
 
-    if (CollectionUtils.isEmpty(siteWhiteIpList)) {
-      List<AdwebSiteBlackIp> enquirySiteWhiteIpList =
+    if (CollectionUtils.isEmpty(siteBlackIpList)) {
+      List<AdwebSiteBlackIp> enquirySiteBlackIpList =
           adwebSiteBlackIpService.list(
               new LambdaQueryWrapper<AdwebSiteBlackIp>()
                   .ne(AdwebSiteBlackIp::getStatus, 0)
-                  .eq(AdwebSiteBlackIp::getBlackOrWhite, 1)
+                  .eq(AdwebSiteBlackIp::getBlackOrWhite, 0)
                   .eq(AdwebSiteBlackIp::getSiteId, adwebSite.getId())
                   .select(AdwebSiteBlackIp::getIp));
-      if (CollectionUtils.isNotEmpty(enquirySiteWhiteIpList)) {
-        siteWhiteIpList =
-            enquirySiteWhiteIpList.stream()
+      if (CollectionUtils.isNotEmpty(enquirySiteBlackIpList)) {
+        siteBlackIpList =
+            enquirySiteBlackIpList.stream()
                 .map(AdwebSiteBlackIp::getIp)
                 .collect(Collectors.toList());
-        adwebRedisUtil.set(siteBlackIpRedisKey, siteWhiteIpList, 60 * 60 * 24);
+        adwebRedisUtil.set(siteBlackIpRedisKey, siteBlackIpList, 60 * 60 * 24);
       } else {
-        siteWhiteIpList = new ArrayList<>();
+        siteBlackIpList = new ArrayList<>();
       }
     }
 
-    return siteWhiteIpList;
+    return siteBlackIpList;
   }
 
   /** 获取站点黑名单邮箱列表 */