|
@@ -243,7 +243,7 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
|
|
|
log.info("获取的子账户id:{}", FastJsonUtil.toJSONString(subAccountIdList));
|
|
|
if (CollectionUtils.isNotEmpty(subAccountIdList)) {
|
|
|
subAccountIdList.add(String.valueOf(adwebSite.getUid()));
|
|
|
- List<SysUser> principalEmailList = sysUserService.list(new QueryWrapper<SysUser>().in("id", subAccountIdList).eq("del_flag", 0).isNotNull("email").ne("email", "").select("id", "email"));
|
|
|
+ List<SysUser> principalEmailList = sysUserService.list(new LambdaQueryWrapper<SysUser>().in(SysUser::getId, subAccountIdList).eq(SysUser::getDelFlag, 0).isNotNull(SysUser::getEmail).ne(SysUser::getEmail, "").select(SysUser::getId, SysUser::getEmail));
|
|
|
if (CollectionUtils.isNotEmpty(principalEmailList)) {
|
|
|
principalEmailMap = principalEmailList.stream().collect(Collectors.toMap(SysUser::getId, SysUser::getEmail));
|
|
|
|
|
@@ -512,8 +512,8 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
|
|
|
enquiryEmailMessageList.forEach(e -> System.out.println(e.getEmail()));
|
|
|
log.info("需要添加的询盘邮件:{}", FastJsonUtil.toJSONString(enquiryEmailMessageList));
|
|
|
if (CollectionUtils.isNotEmpty(enquiryEmailMessageList)) {
|
|
|
- QueryWrapper<EnquiryEmailMessage> enquiryEmailMessageQueryWrapper = new QueryWrapper<>();
|
|
|
- enquiryEmailMessageQueryWrapper.eq("site_code", adwebSite.getCode());
|
|
|
+ LambdaQueryWrapper<EnquiryEmailMessage> enquiryEmailMessageQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ enquiryEmailMessageQueryWrapper.eq(EnquiryEmailMessage::getSiteCode, adwebSite.getCode());
|
|
|
List<EnquiryEmailMessage> enquiryEmailMessages = enquiryEmailMessageService.list(enquiryEmailMessageQueryWrapper);
|
|
|
List<EnquiryEmailMessage> sameEnquiryEmailMessageList = new ArrayList<>();
|
|
|
if (CollectionUtils.isNotEmpty(enquiryEmailMessages)) {
|
|
@@ -618,8 +618,8 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
|
|
|
enquiryEmailMessageList.forEach(e -> System.out.println(e.getEmail()));
|
|
|
log.info("需要添加的询盘邮件:{}", FastJsonUtil.toJSONString(enquiryEmailMessageList));
|
|
|
if (CollectionUtils.isNotEmpty(enquiryEmailMessageList)) {
|
|
|
- QueryWrapper<EnquiryEmailMessage> enquiryEmailMessageQueryWrapper = new QueryWrapper<>();
|
|
|
- enquiryEmailMessageQueryWrapper.eq("site_code", adwebSite.getCode());
|
|
|
+ LambdaQueryWrapper<EnquiryEmailMessage> enquiryEmailMessageQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ enquiryEmailMessageQueryWrapper.eq(EnquiryEmailMessage::getSiteCode, adwebSite.getCode());
|
|
|
List<EnquiryEmailMessage> enquiryEmailMessages = enquiryEmailMessageService.list(enquiryEmailMessageQueryWrapper);
|
|
|
List<EnquiryEmailMessage> sameEnquiryEmailMessageList = new ArrayList<>();
|
|
|
if (CollectionUtils.isNotEmpty(enquiryEmailMessages)) {
|
|
@@ -1096,10 +1096,10 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
|
|
|
log.info("站点ip白名单:" + FastJsonUtil.toJSONString(siteWhiteIpList));
|
|
|
|
|
|
//站点询盘规则黑名单
|
|
|
- QueryWrapper<AdwebSiteEnquiryRule> adwebEnquirySiteRuleQueryWrapper = new QueryWrapper<>();
|
|
|
- adwebEnquirySiteRuleQueryWrapper.eq("site_id", adwebSite.getId());
|
|
|
- adwebEnquirySiteRuleQueryWrapper.eq("status", 1);
|
|
|
- adwebEnquirySiteRuleQueryWrapper.eq("black_or_white", 0);
|
|
|
+ LambdaQueryWrapper<AdwebSiteEnquiryRule> adwebEnquirySiteRuleQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ adwebEnquirySiteRuleQueryWrapper.eq(AdwebSiteEnquiryRule::getSiteId, adwebSite.getId());
|
|
|
+ adwebEnquirySiteRuleQueryWrapper.eq(AdwebSiteEnquiryRule::getStatus, 1);
|
|
|
+ adwebEnquirySiteRuleQueryWrapper.eq(AdwebSiteEnquiryRule::getBlackOrWhite, 0);
|
|
|
List<AdwebSiteEnquiryRule> siteBlackRuleList = adwebSiteEnquiryRuleService.list(adwebEnquirySiteRuleQueryWrapper);
|
|
|
log.info("站点关键词黑名单:" + FastJsonUtil.toJSONString(siteBlackRuleList));
|
|
|
|
|
@@ -1559,7 +1559,7 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
|
|
|
//该分支用于判断是否超过
|
|
|
if (notBlackEmailWasteListCount > emailNotBlackListNum) {
|
|
|
AdwebPublicBlackEmail blackEmail = new AdwebPublicBlackEmail(isJudgeWasteEnquiry.getEmail(), NumConstant.ONE, NumConstant.ZERO);
|
|
|
- if (adwebPublicBlackEmailService.count(new QueryWrapper<AdwebPublicBlackEmail>().eq("email", isJudgeWasteEnquiry.getEmail()).ne("status", 0)) == 0) {
|
|
|
+ if (adwebPublicBlackEmailService.count(new LambdaQueryWrapper<AdwebPublicBlackEmail>().eq(AdwebPublicBlackEmail::getEmail, isJudgeWasteEnquiry.getEmail()).ne(AdwebPublicBlackEmail::getStatus, 0)) == 0) {
|
|
|
adwebPublicBlackEmailService.save(blackEmail);
|
|
|
blackEmailList.add(isJudgeWasteEnquiry.getEmail());
|
|
|
log.info("询盘id是:{}, 站点code是:{}, 检测重复,已标记邮箱, 邮箱是:{}", isJudgeWasteEnquiry.getId(), isJudgeWasteEnquiry.getSiteCode(), isJudgeWasteEnquiry.getEmail());
|
|
@@ -1579,7 +1579,7 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
|
|
|
//该分支用于判断是否出现超过
|
|
|
if (notBlackIpWasteListCount > ipNotBlackListNum) {
|
|
|
AdwebPublicBlackIp blackIp = new AdwebPublicBlackIp(isJudgeWasteEnquiry.getFromIp(), NumConstant.ONE, NumConstant.ZERO);
|
|
|
- if (adwebPublicBlackIpService.count(new QueryWrapper<AdwebPublicBlackIp>().eq("ip", isJudgeWasteEnquiry.getFromIp()).ne("status", 0)) == 0) {
|
|
|
+ if (adwebPublicBlackIpService.count(new LambdaQueryWrapper<AdwebPublicBlackIp>().eq(AdwebPublicBlackIp::getIp, isJudgeWasteEnquiry.getFromIp()).ne(AdwebPublicBlackIp::getStatus, 0)) == 0) {
|
|
|
adwebPublicBlackIpService.save(blackIp);
|
|
|
blackIpList.add(isJudgeWasteEnquiry.getFromIp());
|
|
|
log.info("询盘id是:{}, 站点code是:{}, 检测重复,已标记ip, ip是:{}", isJudgeWasteEnquiry.getId(), isJudgeWasteEnquiry.getSiteCode(), isJudgeWasteEnquiry.getFromIp());
|
|
@@ -1630,7 +1630,7 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
|
|
|
|
|
|
//该分支用于判断是否超过
|
|
|
if (notBlackEmailWasteListCount > emailNotBlackListNum) {
|
|
|
- if (enquirySiteBlackEmailService.count(new QueryWrapper<AdwebSiteBlackEmail>().eq("email", isJudgeWasteEnquiry.getEmail()).ne("status", 0).eq("site_id", adwebSite.getId()).eq("black_or_white", 0)) == 0) {
|
|
|
+ if (enquirySiteBlackEmailService.count(new LambdaQueryWrapper<AdwebSiteBlackEmail>().eq(AdwebSiteBlackEmail::getEmail, isJudgeWasteEnquiry.getEmail()).ne(AdwebSiteBlackEmail::getStatus, 0).eq(AdwebSiteBlackEmail::getSiteId, adwebSite.getId()).eq(AdwebSiteBlackEmail::getBlackOrWhite, 0)) == 0) {
|
|
|
siteBlackEmailList.add(isJudgeWasteEnquiry.getEmail());
|
|
|
log.info("询盘id是:{}, 站点code是:{}, 检测重复,已标记邮箱, 邮箱是:{}", isJudgeWasteEnquiry.getId(), isJudgeWasteEnquiry.getSiteCode(), isJudgeWasteEnquiry.getEmail());
|
|
|
}
|
|
@@ -1653,7 +1653,7 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
|
|
|
|
|
|
//该分支用于判断是否出现超过
|
|
|
if (notBlackIpWasteListCount > ipNotBlackListNum) {
|
|
|
- if (adwebSiteBlackIpService.count(new QueryWrapper<AdwebSiteBlackIp>().eq("ip", isJudgeWasteEnquiry.getFromIp()).ne("status", 0).eq("site_id", adwebSite.getId()).eq("black_or_white", 0)) == 0) {
|
|
|
+ if (adwebSiteBlackIpService.count(new LambdaQueryWrapper<AdwebSiteBlackIp>().eq(AdwebSiteBlackIp::getIp, isJudgeWasteEnquiry.getFromIp()).ne(AdwebSiteBlackIp::getStatus, 0).eq(AdwebSiteBlackIp::getSiteId, adwebSite.getId()).eq(AdwebSiteBlackIp::getBlackOrWhite, 0)) == 0) {
|
|
|
siteBlackIpList.add(isJudgeWasteEnquiry.getFromIp());
|
|
|
log.info("询盘id是:{}, 站点code是:{}, 检测重复,已标记ip, ip是:{}", isJudgeWasteEnquiry.getId(), isJudgeWasteEnquiry.getSiteCode(), isJudgeWasteEnquiry.getFromIp());
|
|
|
}
|
|
@@ -1689,7 +1689,7 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
|
|
|
adwebEnquiry.setEffectiveReason("系统操作-通过十分钟内重复邮箱检测到垃圾询盘-" + adwebEnquiry.getEmail());
|
|
|
log.info("询盘id是:{}, 站点code是:{}, 通过——十分钟内—重复邮箱—检测到垃圾询盘",
|
|
|
adwebEnquiry.getId(), adwebEnquiry.getSiteCode());
|
|
|
- if (enquirySiteBlackEmailService.count(new QueryWrapper<AdwebSiteBlackEmail>().eq("email", adwebEnquiry.getEmail()).ne("status", 0).eq("site_id", adwebSite.getId()).eq("black_or_white", 0)) == 0) {
|
|
|
+ if (enquirySiteBlackEmailService.count(new LambdaQueryWrapper<AdwebSiteBlackEmail>().eq(AdwebSiteBlackEmail::getEmail, adwebEnquiry.getEmail()).ne(AdwebSiteBlackEmail::getStatus, 0).eq(AdwebSiteBlackEmail::getSiteId, adwebSite.getId()).eq(AdwebSiteBlackEmail::getBlackOrWhite, 0)) == 0) {
|
|
|
siteBlackEmailList.add(adwebEnquiry.getEmail());
|
|
|
blackEmailList.add(adwebEnquiry.getEmail());
|
|
|
log.info("询盘id是:{}, 站点code是:{}, 检测十分钟内重复,已标记邮箱, 邮箱是:{}", adwebEnquiry.getId(), adwebEnquiry.getSiteCode(), adwebEnquiry.getEmail());
|
|
@@ -1724,7 +1724,7 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
|
|
|
adwebEnquiry.getId(), adwebEnquiry.getSiteCode());
|
|
|
log.info("'--------dealShortSameEmail -----'===>adwebEnquiry.getEmail():{}", adwebEnquiry.getEmail());
|
|
|
log.info("'--------dealShortSameEmail -----'===>adwebSite.getId():{}", adwebSite.getId());
|
|
|
- if (enquirySiteBlackEmailService.count(new QueryWrapper<AdwebSiteBlackEmail>().eq("email", adwebEnquiry.getEmail()).ne("status", 0).eq("site_id", adwebSite.getId()).eq("black_or_white", 0)) == 0) {
|
|
|
+ if (enquirySiteBlackEmailService.count(new LambdaQueryWrapper<AdwebSiteBlackEmail>().eq(AdwebSiteBlackEmail::getEmail, adwebEnquiry.getEmail()).ne(AdwebSiteBlackEmail::getStatus, 0).eq(AdwebSiteBlackEmail::getSiteId, adwebSite.getId()).eq(AdwebSiteBlackEmail::getBlackOrWhite, 0)) == 0) {
|
|
|
siteBlackEmailList.add(adwebEnquiry.getEmail());
|
|
|
blackEmailList.add(adwebEnquiry.getEmail());
|
|
|
log.info("询盘id是:{}, 站点code是:{}, 检测十分钟内重复,已标记邮箱, 邮箱是:{}", adwebEnquiry.getId(), adwebEnquiry.getSiteCode(), adwebEnquiry.getEmail());
|
|
@@ -1762,7 +1762,7 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
|
|
|
adwebEnquiry.setWasteEnquiryType("ip");
|
|
|
adwebEnquiry.setEffectiveReason("系统操作-通过十分钟内重复IP检测到垃圾询盘-" + adwebEnquiry.getFromIp());
|
|
|
log.info("询盘id是:{}, 站点code是:{}, 通过——十分钟内—重复IP—检测到垃圾询盘", adwebEnquiry.getId(), adwebEnquiry.getSiteCode());
|
|
|
- if (adwebSiteBlackIpService.count(new QueryWrapper<AdwebSiteBlackIp>().eq("ip", adwebEnquiry.getFromIp()).ne("status", 0).eq("site_id", adwebSite.getId()).eq("black_or_white", 0)) == 0) {
|
|
|
+ if (adwebSiteBlackIpService.count(new LambdaQueryWrapper<AdwebSiteBlackIp>().eq(AdwebSiteBlackIp::getIp, adwebEnquiry.getFromIp()).ne(AdwebSiteBlackIp::getStatus, 0).eq(AdwebSiteBlackIp::getSiteId, adwebSite.getId()).eq(AdwebSiteBlackIp::getBlackOrWhite, 0)) == 0) {
|
|
|
siteBlackIpList.add(adwebEnquiry.getFromIp());
|
|
|
blackIpList.add(adwebEnquiry.getFromIp());
|
|
|
log.info("询盘id是:{}, 站点code是:{}, 检测十分钟内重复,已标记ip, ip是:{}", adwebEnquiry.getId(), adwebEnquiry.getSiteCode(), adwebEnquiry.getFromIp());
|
|
@@ -1792,7 +1792,7 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
|
|
|
adwebEnquiry.setWasteEnquiryType("ip");
|
|
|
adwebEnquiry.setEffectiveReason("系统操作-通过一天内重复IP检测到垃圾询盘-" + adwebEnquiry.getFromIp());
|
|
|
log.info("询盘id是:{}, 站点code是:{}, 通过——一天内—重复IP—检测到垃圾询盘", adwebEnquiry.getId(), adwebEnquiry.getSiteCode());
|
|
|
- if (adwebSiteBlackIpService.count(new QueryWrapper<AdwebSiteBlackIp>().eq("ip", adwebEnquiry.getFromIp()).ne("status", 0).eq("site_id", adwebSite.getId()).eq("black_or_white", 0)) == 0) {
|
|
|
+ if (adwebSiteBlackIpService.count(new LambdaQueryWrapper<AdwebSiteBlackIp>().eq(AdwebSiteBlackIp::getIp, adwebEnquiry.getFromIp()).ne(AdwebSiteBlackIp::getStatus, 0).eq(AdwebSiteBlackIp::getSiteId, adwebSite.getId()).eq(AdwebSiteBlackIp::getBlackOrWhite, 0)) == 0) {
|
|
|
siteBlackIpList.add(adwebEnquiry.getFromIp());
|
|
|
blackIpList.add(adwebEnquiry.getFromIp());
|
|
|
log.info("询盘id是:{}, 站点code是:{}, 检测一天内重复,已标记ip, ip是:{}", adwebEnquiry.getId(), adwebEnquiry.getSiteCode(), adwebEnquiry.getFromIp());
|
|
@@ -1829,8 +1829,8 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
|
|
|
public void returnSalesperson(String siteCode, String inquiryId, String sales) {
|
|
|
log.info("返回跟进人名称开始");
|
|
|
//获取站点
|
|
|
- QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("code", siteCode);
|
|
|
+ LambdaQueryWrapper<AdwebSite> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.eq(AdwebSite::getCode, siteCode);
|
|
|
AdwebSite adwebSite = adwebSiteService.getOne(queryWrapper);
|
|
|
|
|
|
RestTemplate restTemplate = new RestTemplate();
|
|
@@ -1918,7 +1918,7 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
|
|
|
try {
|
|
|
List<AdwebEnquiry> enquiryList = this.list(new LambdaQueryWrapper<AdwebEnquiry>().in(AdwebEnquiry::getId, idList));
|
|
|
if (CollectionUtils.isNotEmpty(enquiryList)) {
|
|
|
- AdwebSite adwebSite = adwebSiteService.getOne(new QueryWrapper<AdwebSite>().eq("code", enquiryList.get(0).getSiteCode()));
|
|
|
+ AdwebSite adwebSite = adwebSiteService.getOne(new LambdaQueryWrapper<AdwebSite>().eq(AdwebSite::getCode, enquiryList.get(0).getSiteCode()));
|
|
|
if (adwebSite != null) {
|
|
|
|
|
|
Map<String, String> principalEmailMap = new HashMap<>();
|
|
@@ -1946,7 +1946,7 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
|
|
|
log.info("获取的子账户id:{}", FastJsonUtil.toJSONString(subAccountIdList));
|
|
|
if (CollectionUtils.isNotEmpty(subAccountIdList)) {
|
|
|
subAccountIdList.add(String.valueOf(adwebSite.getUid()));
|
|
|
- List<SysUser> principalEmailList = sysUserService.list(new QueryWrapper<SysUser>().in("id", subAccountIdList).eq("del_flag", 0).isNotNull("email").ne("email", "").select("id", "email"));
|
|
|
+ List<SysUser> principalEmailList = sysUserService.list(new LambdaQueryWrapper<SysUser>().in(SysUser::getId, subAccountIdList).eq(SysUser::getDelFlag, 0).isNotNull(SysUser::getEmail).ne(SysUser::getEmail, "").select(SysUser::getId, SysUser::getEmail));
|
|
|
if (CollectionUtils.isNotEmpty(principalEmailList)) {
|
|
|
principalEmailMap = principalEmailList.stream().collect(Collectors.toMap(SysUser::getId, SysUser::getEmail));
|
|
|
|