|
@@ -18,7 +18,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
|
|
import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
import org.jeecg.common.system.vo.LoginUser;
|
|
|
-import org.jeecg.common.util.RedisUtil;
|
|
|
+import org.jeecg.modules.adweb.common.util.AdwebRedisUtil;
|
|
|
import org.jeecg.modules.adweb.enquiry.entity.AdwebEnquiryBlacklist;
|
|
|
import org.jeecg.modules.adweb.enquiry.entity.AdwebPublicBlackEmail;
|
|
|
import org.jeecg.modules.adweb.enquiry.entity.AdwebSiteBlackEmail;
|
|
@@ -49,7 +49,7 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
|
|
|
@Resource
|
|
|
private IAdwebSiteBlackEmailService enquirySiteBlackEmailService;
|
|
|
@Resource
|
|
|
- private RedisUtil redisUtil;
|
|
|
+ private AdwebRedisUtil adwebRedisUtil;
|
|
|
@Resource
|
|
|
private ISysBaseAPI sysBaseAPI;
|
|
|
|
|
@@ -182,16 +182,16 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
|
|
|
|
|
|
//处理对应站点的黑名单
|
|
|
if (CollectionUtils.isNotEmpty(emailList)) {
|
|
|
- redisUtil.set(SiteBlackEmailKey + "::" + enquirySiteBlackEmail.getSiteId(), emailList, 60 * 60 * 24);
|
|
|
+ adwebRedisUtil.set(SiteBlackEmailKey + "::" + enquirySiteBlackEmail.getSiteId(), emailList, 60 * 60 * 24);
|
|
|
} else {
|
|
|
- redisUtil.del(SiteBlackEmailKey + "::" + enquirySiteBlackEmail.getSiteId());
|
|
|
+ adwebRedisUtil.del(SiteBlackEmailKey + "::" + enquirySiteBlackEmail.getSiteId());
|
|
|
}
|
|
|
|
|
|
//处理对应站点的白名单
|
|
|
if (CollectionUtils.isNotEmpty(whiteEmailList)) {
|
|
|
- redisUtil.set(SiteWhiteEmailListKey + "::" + enquirySiteBlackEmail.getSiteId(), whiteEmailList, 60 * 60 * 24);
|
|
|
+ adwebRedisUtil.set(SiteWhiteEmailListKey + "::" + enquirySiteBlackEmail.getSiteId(), whiteEmailList, 60 * 60 * 24);
|
|
|
} else {
|
|
|
- redisUtil.del(SiteWhiteEmailListKey + "::" + enquirySiteBlackEmail.getSiteId());
|
|
|
+ adwebRedisUtil.del(SiteWhiteEmailListKey + "::" + enquirySiteBlackEmail.getSiteId());
|
|
|
}
|
|
|
return Result.OK("添加成功!");
|
|
|
}
|
|
@@ -239,7 +239,7 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
|
|
|
List<AdwebPublicBlackEmail> emailList = enquiryPublicBlackEmailService.list(new QueryWrapper<AdwebPublicBlackEmail>().eq("status", 1).eq("black_or_white", 0));
|
|
|
List<String> pubicBlackEmailList = emailList.stream().map(AdwebPublicBlackEmail::getEmail).collect(Collectors.toList());
|
|
|
|
|
|
- List<String> publicBlackList = (List<String>) redisUtil.get(BlackEmailKey);
|
|
|
+ List<String> publicBlackList = (List<String>) adwebRedisUtil.get(BlackEmailKey);
|
|
|
|
|
|
publicBlackList.removeAll(pubicBlackEmailList);
|
|
|
if (CollectionUtils.isNotEmpty(publicBlackList)) {
|
|
@@ -254,7 +254,7 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
|
|
|
}
|
|
|
}
|
|
|
pubicBlackEmailList.addAll(publicBlackList);
|
|
|
- redisUtil.set(BlackEmailKey, pubicBlackEmailList, 60 * 60 * 24);
|
|
|
+ adwebRedisUtil.set(BlackEmailKey, pubicBlackEmailList, 60 * 60 * 24);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -275,16 +275,16 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
|
|
|
|
|
|
//处理对应站点的黑名单
|
|
|
if (CollectionUtils.isNotEmpty(emailList)) {
|
|
|
- redisUtil.set(SiteBlackEmailKey + "::" + enquirySiteBlackEmail.getSiteId(), emailList, 60 * 60 * 24);
|
|
|
+ adwebRedisUtil.set(SiteBlackEmailKey + "::" + enquirySiteBlackEmail.getSiteId(), emailList, 60 * 60 * 24);
|
|
|
} else {
|
|
|
- redisUtil.del(SiteBlackEmailKey + "::" + enquirySiteBlackEmail.getSiteId());
|
|
|
+ adwebRedisUtil.del(SiteBlackEmailKey + "::" + enquirySiteBlackEmail.getSiteId());
|
|
|
}
|
|
|
|
|
|
//处理对应站点的白名单
|
|
|
if (CollectionUtils.isNotEmpty(whiteEmailList)) {
|
|
|
- redisUtil.set(SiteWhiteEmailListKey + "::" + enquirySiteBlackEmail.getSiteId(), whiteEmailList, 60 * 60 * 24);
|
|
|
+ adwebRedisUtil.set(SiteWhiteEmailListKey + "::" + enquirySiteBlackEmail.getSiteId(), whiteEmailList, 60 * 60 * 24);
|
|
|
} else {
|
|
|
- redisUtil.del(SiteWhiteEmailListKey + "::" + enquirySiteBlackEmail.getSiteId());
|
|
|
+ adwebRedisUtil.del(SiteWhiteEmailListKey + "::" + enquirySiteBlackEmail.getSiteId());
|
|
|
}
|
|
|
|
|
|
//处理站点改变的数据缓存
|
|
@@ -294,16 +294,16 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
|
|
|
List<String> oldWhiteEmailList = oldAdwebSiteBlackEmailListMap.get("white");
|
|
|
//处理对应站点的黑名单
|
|
|
if (CollectionUtils.isNotEmpty(oldEmailList)) {
|
|
|
- redisUtil.set(SiteBlackEmailKey + "::" + oldAdwebSiteBlackEmail.getSiteId(), oldEmailList, 60 * 60 * 24);
|
|
|
+ adwebRedisUtil.set(SiteBlackEmailKey + "::" + oldAdwebSiteBlackEmail.getSiteId(), oldEmailList, 60 * 60 * 24);
|
|
|
} else {
|
|
|
- redisUtil.del(SiteBlackEmailKey + "::" + oldAdwebSiteBlackEmail.getSiteId());
|
|
|
+ adwebRedisUtil.del(SiteBlackEmailKey + "::" + oldAdwebSiteBlackEmail.getSiteId());
|
|
|
}
|
|
|
|
|
|
//处理对应站点的白名单
|
|
|
if (CollectionUtils.isNotEmpty(oldWhiteEmailList)) {
|
|
|
- redisUtil.set(SiteWhiteEmailListKey + "::" + oldAdwebSiteBlackEmail.getSiteId(), oldWhiteEmailList, 60 * 60 * 24);
|
|
|
+ adwebRedisUtil.set(SiteWhiteEmailListKey + "::" + oldAdwebSiteBlackEmail.getSiteId(), oldWhiteEmailList, 60 * 60 * 24);
|
|
|
} else {
|
|
|
- redisUtil.del(SiteWhiteEmailListKey + "::" + oldAdwebSiteBlackEmail.getSiteId());
|
|
|
+ adwebRedisUtil.del(SiteWhiteEmailListKey + "::" + oldAdwebSiteBlackEmail.getSiteId());
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -335,7 +335,7 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
|
|
|
List<AdwebPublicBlackEmail> pubicEmailList = enquiryPublicBlackEmailService.list(new QueryWrapper<AdwebPublicBlackEmail>().eq("status", 1).eq("black_or_white", 0));
|
|
|
List<String> pubicBlackEmailList = pubicEmailList.stream().map(AdwebPublicBlackEmail::getEmail).collect(Collectors.toList());
|
|
|
|
|
|
- List<String> publicBlackList = (List<String>) redisUtil.get(BlackEmailKey);
|
|
|
+ List<String> publicBlackList = (List<String>) adwebRedisUtil.get(BlackEmailKey);
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(publicBlackList)) {
|
|
|
if (CollectionUtils.isNotEmpty(pubicBlackEmailList)) {
|
|
@@ -354,15 +354,15 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
|
|
|
}
|
|
|
}
|
|
|
pubicBlackEmailList.addAll(publicBlackList);
|
|
|
- redisUtil.set(BlackEmailKey, pubicBlackEmailList, 60 * 60 * 24);
|
|
|
+ adwebRedisUtil.set(BlackEmailKey, pubicBlackEmailList, 60 * 60 * 24);
|
|
|
}
|
|
|
enquirySiteBlackEmail.setStatus(0);
|
|
|
enquirySiteBlackEmail.setUpdateTime(new Date());
|
|
|
enquirySiteBlackEmailService.updateById(enquirySiteBlackEmail);
|
|
|
|
|
|
- redisUtil.del(SiteEmailTenMinKey + enquirySiteBlackEmail.getSiteId() + "::" + enquirySiteBlackEmail.getEmail());
|
|
|
- redisUtil.del(SiteEmailOneDayKey + enquirySiteBlackEmail.getSiteId() + "::" + enquirySiteBlackEmail.getEmail());
|
|
|
- redisUtil.del(NotBlackEmailWasteSiteEnquiryKey + enquirySiteBlackEmail.getSiteId() + "::" + enquirySiteBlackEmail.getEmail());
|
|
|
+ adwebRedisUtil.del(SiteEmailTenMinKey + enquirySiteBlackEmail.getSiteId() + "::" + enquirySiteBlackEmail.getEmail());
|
|
|
+ adwebRedisUtil.del(SiteEmailOneDayKey + enquirySiteBlackEmail.getSiteId() + "::" + enquirySiteBlackEmail.getEmail());
|
|
|
+ adwebRedisUtil.del(NotBlackEmailWasteSiteEnquiryKey + enquirySiteBlackEmail.getSiteId() + "::" + enquirySiteBlackEmail.getEmail());
|
|
|
|
|
|
QueryWrapper<AdwebSiteBlackEmail> siteAllEmailQueryWrapper = new QueryWrapper<>();
|
|
|
siteAllEmailQueryWrapper.ne("status", 0);
|
|
@@ -393,16 +393,16 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
|
|
|
}
|
|
|
//处理对应站点的黑名单
|
|
|
if (CollectionUtils.isNotEmpty(emailList)) {
|
|
|
- redisUtil.set(SiteBlackEmailKey + "::" + enquirySiteBlackEmail.getSiteId(), emailList, 60 * 60 * 24);
|
|
|
+ adwebRedisUtil.set(SiteBlackEmailKey + "::" + enquirySiteBlackEmail.getSiteId(), emailList, 60 * 60 * 24);
|
|
|
} else {
|
|
|
- redisUtil.del(SiteBlackEmailKey + "::" + enquirySiteBlackEmail.getSiteId());
|
|
|
+ adwebRedisUtil.del(SiteBlackEmailKey + "::" + enquirySiteBlackEmail.getSiteId());
|
|
|
}
|
|
|
|
|
|
//处理对应站点的白名单
|
|
|
if (CollectionUtils.isNotEmpty(whiteEmailList)) {
|
|
|
- redisUtil.set(SiteWhiteEmailListKey + "::" + enquirySiteBlackEmail.getSiteId(), whiteEmailList, 60 * 60 * 24);
|
|
|
+ adwebRedisUtil.set(SiteWhiteEmailListKey + "::" + enquirySiteBlackEmail.getSiteId(), whiteEmailList, 60 * 60 * 24);
|
|
|
} else {
|
|
|
- redisUtil.del(SiteWhiteEmailListKey + "::" + enquirySiteBlackEmail.getSiteId());
|
|
|
+ adwebRedisUtil.del(SiteWhiteEmailListKey + "::" + enquirySiteBlackEmail.getSiteId());
|
|
|
}
|
|
|
|
|
|
return Result.OK("删除成功!");
|
|
@@ -442,7 +442,7 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
|
|
|
List<AdwebPublicBlackEmail> pubicEmailList = enquiryPublicBlackEmailService.list(new QueryWrapper<AdwebPublicBlackEmail>().eq("status", 1).eq("black_or_white", 0));
|
|
|
List<String> pubicBlackEmailList = pubicEmailList.stream().map(AdwebPublicBlackEmail::getEmail).collect(Collectors.toList());
|
|
|
|
|
|
- List<String> publicBlackList = (List<String>) redisUtil.get(BlackEmailKey);
|
|
|
+ List<String> publicBlackList = (List<String>) adwebRedisUtil.get(BlackEmailKey);
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(publicBlackList)) {
|
|
|
if (CollectionUtils.isNotEmpty(pubicBlackEmailList)) {
|
|
@@ -461,12 +461,12 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
|
|
|
}
|
|
|
}
|
|
|
pubicBlackEmailList.addAll(publicBlackList);
|
|
|
- redisUtil.set(BlackEmailKey, pubicBlackEmailList, 60 * 60 * 24);
|
|
|
+ adwebRedisUtil.set(BlackEmailKey, pubicBlackEmailList, 60 * 60 * 24);
|
|
|
}
|
|
|
|
|
|
- redisUtil.del(SiteEmailTenMinKey + enquirySiteBlackEmail.getSiteId() + "::" + enquirySiteBlackEmail.getEmail());
|
|
|
- redisUtil.del(SiteEmailOneDayKey + enquirySiteBlackEmail.getSiteId() + "::" + enquirySiteBlackEmail.getEmail());
|
|
|
- redisUtil.del(NotBlackEmailWasteSiteEnquiryKey + enquirySiteBlackEmail.getSiteId() + "::" + enquirySiteBlackEmail.getEmail());
|
|
|
+ adwebRedisUtil.del(SiteEmailTenMinKey + enquirySiteBlackEmail.getSiteId() + "::" + enquirySiteBlackEmail.getEmail());
|
|
|
+ adwebRedisUtil.del(SiteEmailOneDayKey + enquirySiteBlackEmail.getSiteId() + "::" + enquirySiteBlackEmail.getEmail());
|
|
|
+ adwebRedisUtil.del(NotBlackEmailWasteSiteEnquiryKey + enquirySiteBlackEmail.getSiteId() + "::" + enquirySiteBlackEmail.getEmail());
|
|
|
siteList.add(enquirySiteBlackEmail.getSiteId());
|
|
|
}
|
|
|
|
|
@@ -501,16 +501,16 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
|
|
|
}
|
|
|
//处理对应站点的黑名单
|
|
|
if (CollectionUtils.isNotEmpty(emailList)) {
|
|
|
- redisUtil.set(SiteBlackEmailKey + "::" + siteId, emailList, 60 * 60 * 24);
|
|
|
+ adwebRedisUtil.set(SiteBlackEmailKey + "::" + siteId, emailList, 60 * 60 * 24);
|
|
|
} else {
|
|
|
- redisUtil.del(SiteBlackEmailKey + "::" + siteId);
|
|
|
+ adwebRedisUtil.del(SiteBlackEmailKey + "::" + siteId);
|
|
|
}
|
|
|
|
|
|
//处理对应站点的白名单
|
|
|
if (CollectionUtils.isNotEmpty(whiteEmailList)) {
|
|
|
- redisUtil.set(SiteWhiteEmailListKey + "::" + siteId, whiteEmailList, 60 * 60 * 24);
|
|
|
+ adwebRedisUtil.set(SiteWhiteEmailListKey + "::" + siteId, whiteEmailList, 60 * 60 * 24);
|
|
|
} else {
|
|
|
- redisUtil.del(SiteWhiteEmailListKey + "::" + siteId);
|
|
|
+ adwebRedisUtil.del(SiteWhiteEmailListKey + "::" + siteId);
|
|
|
}
|
|
|
}
|
|
|
return update ? Result.OK("批量删除成功!") : Result.error("批量删除失败!");
|