#245 Lambda

Open
wangfan wants to merge 1 commits from wangfan/lambda into wangfan/master
15 changed files with 215 additions and 213 deletions
  1. 15 15
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/api/controller/OpenAPIController.java
  2. 18 18
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/controller/AdwebEnquiryBlacklistController.java
  3. 45 46
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/controller/AdwebEnquiryController.java
  4. 6 4
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/impl/AdwebEnquiryBlacklistServiceImpl.java
  5. 21 21
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/impl/AdwebEnquiryServiceImpl.java
  6. 13 13
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/impl/AdwebSiteBlackEmailServiceImpl.java
  7. 27 22
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/seo/controller/SeoKeywordsController.java
  8. 18 19
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/seo/service/impl/SeoKeywordsRankServiceImpl.java
  9. 14 15
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/seo/service/impl/SeoPlanSubscriptionServiceImpl.java
  10. 4 4
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/site/controller/AdwebSiteManageController.java
  11. 4 5
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/site/service/impl/AdwebSiteServiceImpl.java
  12. 6 7
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/site/service/impl/AdwebUserWpsiteServiceImpl.java
  13. 7 6
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/subscribePlan/controller/SubscribePlanController.java
  14. 6 7
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/impl/MasterSubAccountRelationServiceImpl.java
  15. 11 11
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/impl/SysAdwebApiImpl.java

+ 15 - 15
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/api/controller/OpenAPIController.java

@@ -1,6 +1,6 @@
 package org.jeecg.modules.adweb.api.controller;
 package org.jeecg.modules.adweb.api.controller;
 
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import jakarta.annotation.Resource;
 import jakarta.annotation.Resource;
@@ -62,15 +62,15 @@ public class OpenAPIController {
 
 
         log.info("苏豪通请求产品列表 parameter: {}", apiRequest);
         log.info("苏豪通请求产品列表 parameter: {}", apiRequest);
 
 
-        QueryWrapper<AdwebSite> adwebSiteQueryWrapper = new QueryWrapper<>();
-        adwebSiteQueryWrapper.like("domain", apiRequest.getDomain());
+        LambdaQueryWrapper<AdwebSite> adwebSiteQueryWrapper = new LambdaQueryWrapper<>();
+        adwebSiteQueryWrapper.like(AdwebSite::getDomain, apiRequest.getDomain());
         List<AdwebSite> adwebSites =
         List<AdwebSite> adwebSites =
                 adwebSiteService.getBaseMapper().selectList(adwebSiteQueryWrapper);
                 adwebSiteService.getBaseMapper().selectList(adwebSiteQueryWrapper);
 
 
         if (CollectionUtils.isNotEmpty(adwebSites)) {
         if (CollectionUtils.isNotEmpty(adwebSites)) {
-            QueryWrapper<AdwebProduct> adwebProductQueryWrapper = new QueryWrapper<>();
-            adwebProductQueryWrapper.eq("site_code", adwebSites.get(0).getCode());
-            adwebProductQueryWrapper.ne("action_type", "delete");
+            LambdaQueryWrapper<AdwebProduct> adwebProductQueryWrapper = new LambdaQueryWrapper<>();
+            adwebProductQueryWrapper.eq(AdwebProduct::getSiteCode, adwebSites.get(0).getCode());
+            adwebProductQueryWrapper.ne(AdwebProduct::getActionType, "delete");
             List<AdwebProduct> adwebProducts = adwebProductService.list(adwebProductQueryWrapper);
             List<AdwebProduct> adwebProducts = adwebProductService.list(adwebProductQueryWrapper);
 
 
             return Result.ok(adwebProducts.stream().map(ProductInfoVO::fromAdwebProduct).toList());
             return Result.ok(adwebProducts.stream().map(ProductInfoVO::fromAdwebProduct).toList());
@@ -92,8 +92,8 @@ public class OpenAPIController {
 
 
         log.info("苏豪通请求询盘列表 parameter: {}", apiRequest);
         log.info("苏豪通请求询盘列表 parameter: {}", apiRequest);
 
 
-        QueryWrapper<AdwebSite> adwebSiteQueryWrapper = new QueryWrapper<>();
-        adwebSiteQueryWrapper.like("domain", apiRequest.getDomain());
+        LambdaQueryWrapper<AdwebSite> adwebSiteQueryWrapper = new LambdaQueryWrapper<>();
+        adwebSiteQueryWrapper.like(AdwebSite::getDomain, apiRequest.getDomain());
         List<AdwebSite> adwebSites =
         List<AdwebSite> adwebSites =
                 adwebSiteService.getBaseMapper().selectList(adwebSiteQueryWrapper);
                 adwebSiteService.getBaseMapper().selectList(adwebSiteQueryWrapper);
 
 
@@ -101,9 +101,9 @@ public class OpenAPIController {
         if (CollectionUtils.isNotEmpty(adwebSites)) {
         if (CollectionUtils.isNotEmpty(adwebSites)) {
             Page<AdwebEnquiry> page = new Page<>(apiRequest.getPageNo(), apiRequest.getPageSize());
             Page<AdwebEnquiry> page = new Page<>(apiRequest.getPageNo(), apiRequest.getPageSize());
 
 
-            QueryWrapper<AdwebEnquiry> enquiryQueryWrapper = new QueryWrapper<>();
-            enquiryQueryWrapper.eq("site_code", adwebSites.get(0).getCode());
-            enquiryQueryWrapper.in("user_effective", "1", "2"); // 获取所有有效询盘
+            LambdaQueryWrapper<AdwebEnquiry> enquiryQueryWrapper = new LambdaQueryWrapper<>();
+            enquiryQueryWrapper.eq(AdwebEnquiry::getSiteCode, adwebSites.get(0).getCode());
+            enquiryQueryWrapper.in(AdwebEnquiry::getUserEffective, "1", "2"); // 获取所有有效询盘
             IPage<AdwebEnquiry> pageList = adwebEnquiryService.page(page, enquiryQueryWrapper);
             IPage<AdwebEnquiry> pageList = adwebEnquiryService.page(page, enquiryQueryWrapper);
 
 
             if (pageList != null && CollectionUtils.isNotEmpty(pageList.getRecords())) {
             if (pageList != null && CollectionUtils.isNotEmpty(pageList.getRecords())) {
@@ -141,8 +141,8 @@ public class OpenAPIController {
 
 
         log.info("request from domain: {}", domain);
         log.info("request from domain: {}", domain);
         // 获取站点
         // 获取站点
-        QueryWrapper<AdwebSite> adwebSiteQueryWrapper = new QueryWrapper<>();
-        adwebSiteQueryWrapper.like("domain", domain);
+        LambdaQueryWrapper<AdwebSite> adwebSiteQueryWrapper = new LambdaQueryWrapper<>();
+        adwebSiteQueryWrapper.like(AdwebSite::getDomain, domain);
         AdwebSite adwebsite = adwebSiteService.getOne(adwebSiteQueryWrapper);
         AdwebSite adwebsite = adwebSiteService.getOne(adwebSiteQueryWrapper);
         if (adwebsite == null) {
         if (adwebsite == null) {
             return Result.error("该站点未绑定adweb3系统!");
             return Result.error("该站点未绑定adweb3系统!");
@@ -180,8 +180,8 @@ public class OpenAPIController {
 
 
         log.info("EnquiryMaxDate request from domain: {}", domain);
         log.info("EnquiryMaxDate request from domain: {}", domain);
         // 获取站点
         // 获取站点
-        QueryWrapper<AdwebSite> adwebSiteQueryWrapper = new QueryWrapper<>();
-        adwebSiteQueryWrapper.like("domain", domain);
+        LambdaQueryWrapper<AdwebSite> adwebSiteQueryWrapper = new LambdaQueryWrapper<>();
+        adwebSiteQueryWrapper.like(AdwebSite::getDomain, domain);
         AdwebSite adwebsite = adwebSiteService.getOne(adwebSiteQueryWrapper);
         AdwebSite adwebsite = adwebSiteService.getOne(adwebSiteQueryWrapper);
         if (adwebsite == null) {
         if (adwebsite == null) {
             return Result.error("该站点未绑定adweb3系统!");
             return Result.error("该站点未绑定adweb3系统!");

+ 18 - 18
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/controller/AdwebEnquiryBlacklistController.java

@@ -1,6 +1,6 @@
 package org.jeecg.modules.adweb.enquiry.controller;
 package org.jeecg.modules.adweb.enquiry.controller;
 
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
@@ -82,33 +82,33 @@ public class AdwebEnquiryBlacklistController extends JeecgController<AdwebEnquir
                                    @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                    @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                    Integer siteId) {
                                    Integer siteId) {
         LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        QueryWrapper<AdwebEnquiryBlacklist> queryWrapper = new QueryWrapper<>();
+        LambdaQueryWrapper<AdwebEnquiryBlacklist> queryWrapper = new LambdaQueryWrapper<>();
         if (siteId != null) {
         if (siteId != null) {
             List<Integer> siteIds = adwebSiteService.getAllSiteIdByParentId(siteId);
             List<Integer> siteIds = adwebSiteService.getAllSiteIdByParentId(siteId);
-            queryWrapper.in("site_id", siteIds);
+            queryWrapper.in(AdwebEnquiryBlacklist::getSiteId, siteIds);
         } else if (!sysAdwebApi.isAdmin()) {
         } else if (!sysAdwebApi.isAdmin()) {
             if (sysAdwebApi.isChannelAdmin()) {
             if (sysAdwebApi.isChannelAdmin()) {
                 List<String> channelGroupUids = sysAdwebApi.getChannelGroupUids();
                 List<String> channelGroupUids = sysAdwebApi.getChannelGroupUids();
 
 
                 List<String> codeList = siteUserPermissionService.getSiteCodeListByUids(channelGroupUids);
                 List<String> codeList = siteUserPermissionService.getSiteCodeListByUids(channelGroupUids);
-                QueryWrapper<AdwebSite> queryWrapper1 = new QueryWrapper<>();
-                queryWrapper1.ne("status", 0);
-                queryWrapper1.in("code", codeList);
+                LambdaQueryWrapper<AdwebSite> queryWrapper1 = new LambdaQueryWrapper<>();
+                queryWrapper1.ne(AdwebSite::getStatus, 0);
+                queryWrapper1.in(AdwebSite::getCode, codeList);
                 List<AdwebSite> siteList = adwebSiteService.list(queryWrapper1);
                 List<AdwebSite> siteList = adwebSiteService.list(queryWrapper1);
                 List<Integer> siteIds = new ArrayList<>();
                 List<Integer> siteIds = new ArrayList<>();
                 for (AdwebSite site : siteList) {
                 for (AdwebSite site : siteList) {
                     siteIds.add(site.getId());
                     siteIds.add(site.getId());
                 }
                 }
-                queryWrapper.in("site_id", siteIds);
+                queryWrapper.in(AdwebEnquiryBlacklist::getSiteId, siteIds);
             } else {
             } else {
                 List<Integer> siteIds = adwebSiteService.getAllSiteIdByUid(loginUser.getId());
                 List<Integer> siteIds = adwebSiteService.getAllSiteIdByUid(loginUser.getId());
-                queryWrapper.in("site_id", siteIds);
+                queryWrapper.in(AdwebEnquiryBlacklist::getSiteId, siteIds);
             }
             }
         }
         }
         if (StringUtils.isNotBlank(queryParam)) {
         if (StringUtils.isNotBlank(queryParam)) {
-            queryWrapper.and(wrapper -> wrapper.like("email", queryParam)
-                    .or().like("name", queryParam)
-                    .or().like("country_name", queryParam));
+            queryWrapper.and(wrapper -> wrapper.like(AdwebEnquiryBlacklist::getEmail, queryParam)
+                    .or().like(AdwebEnquiryBlacklist::getName, queryParam)
+                    .or().like(AdwebEnquiryBlacklist::getCountryName, queryParam));
         }
         }
 
 
         if (sysAdwebApi.isAdwebSubVip()) {
         if (sysAdwebApi.isAdwebSubVip()) {
@@ -122,12 +122,12 @@ public class AdwebEnquiryBlacklistController extends JeecgController<AdwebEnquir
                 if (CollectionUtils.isEmpty(countryCodes)) {
                 if (CollectionUtils.isEmpty(countryCodes)) {
                     return Result.OK(new Page<>(pageNo, pageSize));
                     return Result.OK(new Page<>(pageNo, pageSize));
                 }
                 }
-                queryWrapper.in("country_code", countryCodes);
+                queryWrapper.in(AdwebEnquiryBlacklist::getCountryCode, countryCodes);
             }
             }
         }
         }
 
 
-        queryWrapper.eq("status", 1);
-        queryWrapper.orderByDesc("create_time");
+        queryWrapper.eq(AdwebEnquiryBlacklist::getStatus, 1);
+        queryWrapper.orderByDesc(AdwebEnquiryBlacklist::getCreateTime);
         Page<AdwebEnquiryBlacklist> page = new Page<AdwebEnquiryBlacklist>(pageNo, pageSize);
         Page<AdwebEnquiryBlacklist> page = new Page<AdwebEnquiryBlacklist>(pageNo, pageSize);
         IPage<AdwebEnquiryBlacklist> pageList = adwebEnquiryBlacklistService.page(page, queryWrapper);
         IPage<AdwebEnquiryBlacklist> pageList = adwebEnquiryBlacklistService.page(page, queryWrapper);
 
 
@@ -160,10 +160,10 @@ public class AdwebEnquiryBlacklistController extends JeecgController<AdwebEnquir
 
 
 
 
         //判断站点询盘黑名单是否存在添加进来的黑名单
         //判断站点询盘黑名单是否存在添加进来的黑名单
-        QueryWrapper<AdwebSiteBlackEmail> enquirySiteBlackEmailQueryWrapper = new QueryWrapper<>();
-        enquirySiteBlackEmailQueryWrapper.eq("site_id", adwebEnquiry.getSiteId());
-        enquirySiteBlackEmailQueryWrapper.eq("status", 1);
-        enquirySiteBlackEmailQueryWrapper.eq("email", adwebEnquiry.getFromEmail());
+        LambdaQueryWrapper<AdwebSiteBlackEmail> enquirySiteBlackEmailQueryWrapper = new LambdaQueryWrapper<>();
+        enquirySiteBlackEmailQueryWrapper.eq(AdwebSiteBlackEmail::getSiteId, adwebEnquiry.getSiteId());
+        enquirySiteBlackEmailQueryWrapper.eq(AdwebSiteBlackEmail::getStatus, 1);
+        enquirySiteBlackEmailQueryWrapper.eq(AdwebSiteBlackEmail::getEmail, adwebEnquiry.getFromEmail());
         List<AdwebSiteBlackEmail> enquirySiteBlackEmailList = enquirySiteBlackEmailService.list(enquirySiteBlackEmailQueryWrapper);
         List<AdwebSiteBlackEmail> enquirySiteBlackEmailList = enquirySiteBlackEmailService.list(enquirySiteBlackEmailQueryWrapper);
 
 
         if (CollectionUtils.isNotEmpty(enquirySiteBlackEmailList)) {
         if (CollectionUtils.isNotEmpty(enquirySiteBlackEmailList)) {

+ 45 - 46
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/controller/AdwebEnquiryController.java

@@ -1,7 +1,6 @@
 package org.jeecg.modules.adweb.enquiry.controller;
 package org.jeecg.modules.adweb.enquiry.controller;
 
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -140,10 +139,10 @@ public class AdwebEnquiryController extends JeecgController<AdwebEnquiry, IAdweb
         if (searchDto.getSiteId() != null) {
         if (searchDto.getSiteId() != null) {
             String siteCode = adwebSiteService.getSiteCodeById(searchDto.getSiteId());
             String siteCode = adwebSiteService.getSiteCodeById(searchDto.getSiteId());
             if (StringUtils.isNotBlank(siteCode)) {
             if (StringUtils.isNotBlank(siteCode)) {
-                QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
-                queryWrapper.eq("id", searchDto.getSiteId()).or().eq("parent_group_code", siteCode);
-                queryWrapper.ne("status", 0);
-                queryWrapper.in(!sysAdwebApi.isAdmin(), "code", siteCodeList);
+                LambdaQueryWrapper<AdwebSite> queryWrapper = new LambdaQueryWrapper<>();
+                queryWrapper.eq(AdwebSite::getId, searchDto.getSiteId()).or().eq(AdwebSite::getParentGroupCode, siteCode);
+                queryWrapper.ne(AdwebSite::getStatus, 0);
+                queryWrapper.in(!sysAdwebApi.isAdmin(), AdwebSite::getCode, siteCodeList);
                 codeList = adwebSiteService.list(queryWrapper).stream().map(AdwebSite::getCode).collect(Collectors.toList());
                 codeList = adwebSiteService.list(queryWrapper).stream().map(AdwebSite::getCode).collect(Collectors.toList());
             }
             }
         } else {
         } else {
@@ -387,15 +386,15 @@ public class AdwebEnquiryController extends JeecgController<AdwebEnquiry, IAdweb
         List<Integer> siteIds = null;
         List<Integer> siteIds = null;
         if (siteId != null) {
         if (siteId != null) {
             String siteCode = adwebSiteService.getSiteCodeById(siteId);
             String siteCode = adwebSiteService.getSiteCodeById(siteId);
-            QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
-            queryWrapper.eq("code", siteCode).or().eq("parent_group_code", siteCode);
-            queryWrapper.ne("status", 0);
+            LambdaQueryWrapper<AdwebSite> queryWrapper = new LambdaQueryWrapper<>();
+            queryWrapper.eq(AdwebSite::getCode, siteCode).or().eq(AdwebSite::getParentGroupCode, siteCode);
+            queryWrapper.ne(AdwebSite::getStatus, 0);
             List<AdwebSite> sites = adwebSiteService.list(queryWrapper);
             List<AdwebSite> sites = adwebSiteService.list(queryWrapper);
             siteIds = sites.stream().map(AdwebSite::getId).collect(Collectors.toList());
             siteIds = sites.stream().map(AdwebSite::getId).collect(Collectors.toList());
         } else {
         } else {
             if (sysAdwebApi.isAdmin()) {
             if (sysAdwebApi.isAdmin()) {
-                QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
-                queryWrapper.ne("status", 0);
+                LambdaQueryWrapper<AdwebSite> queryWrapper = new LambdaQueryWrapper<>();
+                queryWrapper.ne(AdwebSite::getStatus, 0);
                 List<AdwebSite> sites = adwebSiteService.list(queryWrapper);
                 List<AdwebSite> sites = adwebSiteService.list(queryWrapper);
                 siteIds = sites.stream().map(AdwebSite::getId).collect(Collectors.toList());
                 siteIds = sites.stream().map(AdwebSite::getId).collect(Collectors.toList());
             } else if (sysAdwebApi.isChannelAdmin()) {
             } else if (sysAdwebApi.isChannelAdmin()) {
@@ -421,79 +420,79 @@ public class AdwebEnquiryController extends JeecgController<AdwebEnquiry, IAdweb
             principalUid = loginUser.getId();
             principalUid = loginUser.getId();
         }
         }
 
 
-        QueryWrapper<AdwebEnquiry> enquiryQueryWrapper = new QueryWrapper<>();
-        enquiryQueryWrapper.eq("status", 1);
+        LambdaQueryWrapper<AdwebEnquiry> enquiryQueryWrapper = new LambdaQueryWrapper<>();
+        enquiryQueryWrapper.eq(AdwebEnquiry::getStatus, 1);
         if (start != null) {
         if (start != null) {
-            enquiryQueryWrapper.ge("record_ctime", start);
+            enquiryQueryWrapper.ge(AdwebEnquiry::getRecordCtime, start);
         }
         }
         if (end != null) {
         if (end != null) {
-            enquiryQueryWrapper.lt("record_ctime", DateUtil.addDays(end, 1));
+            enquiryQueryWrapper.lt(AdwebEnquiry::getRecordCtime, DateUtil.addDays(end, 1));
         }
         }
         if (siteIds != null) {
         if (siteIds != null) {
-            enquiryQueryWrapper.in("site_id", siteIds);
+            enquiryQueryWrapper.in(AdwebEnquiry::getSiteId, siteIds);
         }
         }
         if (StringUtils.isNotBlank(principalUid)) {
         if (StringUtils.isNotBlank(principalUid)) {
             String finalPrincipalUid = principalUid;
             String finalPrincipalUid = principalUid;
-            enquiryQueryWrapper.and(wrapper -> wrapper.eq("principal_uid", finalPrincipalUid).or().eq("principal_uid", "ALL"));
+            enquiryQueryWrapper.and(wrapper -> wrapper.eq(AdwebEnquiry::getPrincipalUid, finalPrincipalUid).or().eq(AdwebEnquiry::getPrincipalUid, "ALL"));
         }
         }
-        enquiryQueryWrapper.ne("user_effective", 0);
+        enquiryQueryWrapper.ne(AdwebEnquiry::getUserEffective, 0);
         int all = (int) adwebEnquiryService.count(enquiryQueryWrapper);
         int all = (int) adwebEnquiryService.count(enquiryQueryWrapper);
 
 
-        QueryWrapper<AdwebEnquiry> enquiryQueryWrapper1 = new QueryWrapper<>();
-        enquiryQueryWrapper1.eq("status", 1);
+        LambdaQueryWrapper<AdwebEnquiry> enquiryQueryWrapper1 = new LambdaQueryWrapper<>();
+        enquiryQueryWrapper1.eq(AdwebEnquiry::getStatus, 1);
         if (start != null) {
         if (start != null) {
-            enquiryQueryWrapper1.ge("record_ctime", start);
+            enquiryQueryWrapper1.ge(AdwebEnquiry::getRecordCtime, start);
         }
         }
         if (end != null) {
         if (end != null) {
-            enquiryQueryWrapper1.lt("record_ctime", DateUtil.addDays(end, 1));
+            enquiryQueryWrapper1.lt(AdwebEnquiry::getRecordCtime, DateUtil.addDays(end, 1));
         }
         }
         if (siteIds != null) {
         if (siteIds != null) {
-            enquiryQueryWrapper1.in("site_id", siteIds);
+            enquiryQueryWrapper1.in(AdwebEnquiry::getSiteId, siteIds);
         }
         }
-        enquiryQueryWrapper1.eq("read_status", 0);
+        enquiryQueryWrapper1.eq(AdwebEnquiry::getReadStatus, 0);
         if (StringUtils.isNotBlank(principalUid)) {
         if (StringUtils.isNotBlank(principalUid)) {
             String finalPrincipalUid = principalUid;
             String finalPrincipalUid = principalUid;
-            enquiryQueryWrapper1.and(wrapper -> wrapper.eq("principal_uid", finalPrincipalUid).or().eq("principal_uid", "ALL"));
+            enquiryQueryWrapper1.and(wrapper -> wrapper.eq(AdwebEnquiry::getPrincipalUid, finalPrincipalUid).or().eq(AdwebEnquiry::getPrincipalUid, "ALL"));
         }
         }
-        enquiryQueryWrapper1.ne("user_effective", 0);
+        enquiryQueryWrapper1.ne(AdwebEnquiry::getUserEffective, 0);
         int noRead = (int) adwebEnquiryService.count(enquiryQueryWrapper1);
         int noRead = (int) adwebEnquiryService.count(enquiryQueryWrapper1);
 
 
-        QueryWrapper<AdwebEnquiry> enquiryQueryWrapper2 = new QueryWrapper<>();
-        enquiryQueryWrapper2.eq("status", 1);
+        LambdaQueryWrapper<AdwebEnquiry> enquiryQueryWrapper2 = new LambdaQueryWrapper<>();
+        enquiryQueryWrapper2.eq(AdwebEnquiry::getStatus, 1);
         if (start != null) {
         if (start != null) {
-            enquiryQueryWrapper2.ge("record_ctime", start);
+            enquiryQueryWrapper2.ge(AdwebEnquiry::getRecordCtime, start);
         }
         }
         if (end != null) {
         if (end != null) {
-            enquiryQueryWrapper2.lt("record_ctime", DateUtil.addDays(end, 1));
+            enquiryQueryWrapper2.lt(AdwebEnquiry::getRecordCtime, DateUtil.addDays(end, 1));
         }
         }
         if (siteIds != null) {
         if (siteIds != null) {
-            enquiryQueryWrapper2.in("site_id", siteIds);
+            enquiryQueryWrapper2.in(AdwebEnquiry::getSiteId, siteIds);
         }
         }
-        enquiryQueryWrapper2.eq("user_effective", 1);
+        enquiryQueryWrapper2.eq(AdwebEnquiry::getUserEffective, 1);
         if (StringUtils.isNotBlank(principalUid)) {
         if (StringUtils.isNotBlank(principalUid)) {
             String finalPrincipalUid = principalUid;
             String finalPrincipalUid = principalUid;
-            enquiryQueryWrapper2.and(wrapper -> wrapper.eq("principal_uid", finalPrincipalUid).or().eq("principal_uid", "ALL"));
+            enquiryQueryWrapper2.and(wrapper -> wrapper.eq(AdwebEnquiry::getPrincipalUid, finalPrincipalUid).or().eq(AdwebEnquiry::getPrincipalUid, "ALL"));
         }
         }
-        enquiryQueryWrapper2.ne("user_effective", 0);
+        enquiryQueryWrapper2.ne(AdwebEnquiry::getUserEffective, 0);
         int product = (int) adwebEnquiryService.count(enquiryQueryWrapper2);
         int product = (int) adwebEnquiryService.count(enquiryQueryWrapper2);
 
 
-        QueryWrapper<AdwebEnquiry> enquiryQueryWrapper3 = new QueryWrapper<>();
-        enquiryQueryWrapper3.eq("status", 1);
+        LambdaQueryWrapper<AdwebEnquiry> enquiryQueryWrapper3 = new LambdaQueryWrapper<>();
+        enquiryQueryWrapper3.eq(AdwebEnquiry::getStatus, 1);
         if (start != null) {
         if (start != null) {
-            enquiryQueryWrapper3.ge("record_ctime", start);
+            enquiryQueryWrapper3.ge(AdwebEnquiry::getRecordCtime, start);
         }
         }
         if (end != null) {
         if (end != null) {
-            enquiryQueryWrapper3.lt("record_ctime", DateUtil.addDays(end, 1));
+            enquiryQueryWrapper3.lt(AdwebEnquiry::getRecordCtime, DateUtil.addDays(end, 1));
         }
         }
         if (siteIds != null) {
         if (siteIds != null) {
-            enquiryQueryWrapper3.in("site_id", siteIds);
+            enquiryQueryWrapper3.in(AdwebEnquiry::getSiteId, siteIds);
         }
         }
-        enquiryQueryWrapper3.eq("user_effective", 2);
+        enquiryQueryWrapper3.eq(AdwebEnquiry::getUserEffective, 2);
         if (StringUtils.isNotBlank(principalUid)) {
         if (StringUtils.isNotBlank(principalUid)) {
             String finalPrincipalUid = principalUid;
             String finalPrincipalUid = principalUid;
-            enquiryQueryWrapper3.and(wrapper -> wrapper.eq("principal_uid", finalPrincipalUid).or().eq("principal_uid", "ALL"));
+            enquiryQueryWrapper3.and(wrapper -> wrapper.eq(AdwebEnquiry::getPrincipalUid, finalPrincipalUid).or().eq(AdwebEnquiry::getPrincipalUid, "ALL"));
         }
         }
-        enquiryQueryWrapper3.ne("user_effective", 0);
+        enquiryQueryWrapper3.ne(AdwebEnquiry::getUserEffective, 0);
         int wait = (int) adwebEnquiryService.count(enquiryQueryWrapper3);
         int wait = (int) adwebEnquiryService.count(enquiryQueryWrapper3);
 
 
         Map<String, Integer> map = new HashMap<>();
         Map<String, Integer> map = new HashMap<>();
@@ -572,12 +571,12 @@ public class AdwebEnquiryController extends JeecgController<AdwebEnquiry, IAdweb
         updateWrapper.set(AdwebEnquiry::getPrincipalType, 1);
         updateWrapper.set(AdwebEnquiry::getPrincipalType, 1);
         adwebEnquiryService.update(updateWrapper);
         adwebEnquiryService.update(updateWrapper);
 
 
-        QueryWrapper<AdwebEnquiry> queryWrapper = new QueryWrapper<>();
-        queryWrapper.in("id", idList);
+        LambdaQueryWrapper<AdwebEnquiry> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.in(AdwebEnquiry::getId, idList);
         List<AdwebEnquiry> list = adwebEnquiryService.list(queryWrapper);
         List<AdwebEnquiry> list = adwebEnquiryService.list(queryWrapper);
-        //获取站点
-        QueryWrapper<AdwebSite> adwebSiteQueryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("code", code);
+        // 获取站点
+        LambdaQueryWrapper<AdwebSite> adwebSiteQueryWrapper = new LambdaQueryWrapper<>();
+        adwebSiteQueryWrapper.eq(AdwebSite::getCode, code);
         AdwebSite adwebSite = adwebSiteService.getOne(adwebSiteQueryWrapper);
         AdwebSite adwebSite = adwebSiteService.getOne(adwebSiteQueryWrapper);
 
 
         //返回跟进人名称
         //返回跟进人名称

+ 6 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/impl/AdwebEnquiryBlacklistServiceImpl.java

@@ -1,9 +1,11 @@
 package org.jeecg.modules.adweb.enquiry.service.impl;
 package org.jeecg.modules.adweb.enquiry.service.impl;
 
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.xkcoding.http.util.StringUtil;
 import com.xkcoding.http.util.StringUtil;
 import jakarta.annotation.Resource;
 import jakarta.annotation.Resource;
+import kotlin.jvm.internal.Lambda;
 import org.jeecg.modules.adweb.enquiry.entity.AdwebEnquiry;
 import org.jeecg.modules.adweb.enquiry.entity.AdwebEnquiry;
 import org.jeecg.modules.adweb.enquiry.entity.AdwebEnquiryBlacklist;
 import org.jeecg.modules.adweb.enquiry.entity.AdwebEnquiryBlacklist;
 import org.jeecg.modules.adweb.enquiry.mapper.AdwebEnquiryBlacklistMapper;
 import org.jeecg.modules.adweb.enquiry.mapper.AdwebEnquiryBlacklistMapper;
@@ -39,10 +41,10 @@ public class AdwebEnquiryBlacklistServiceImpl extends ServiceImpl<AdwebEnquiryBl
             return false;
             return false;
         }
         }
         List<Integer> siteIds = adwebSiteService.getAllSiteIdBySiteId(adwebEnquiry.getSiteId());
         List<Integer> siteIds = adwebSiteService.getAllSiteIdBySiteId(adwebEnquiry.getSiteId());
-        QueryWrapper<AdwebEnquiryBlacklist> queryWrapper = new QueryWrapper<>();
-        queryWrapper.in("site_id", siteIds);
-        queryWrapper.eq("status", 1);
-        queryWrapper.and(wrapper -> wrapper.eq("email", email).or().eq("phone", phone));
+        LambdaQueryWrapper<AdwebEnquiryBlacklist> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.in(AdwebEnquiryBlacklist::getSiteId, siteIds);
+        queryWrapper.eq(AdwebEnquiryBlacklist::getStatus, 1);
+        queryWrapper.and(wrapper -> wrapper.eq(AdwebEnquiryBlacklist::getEmail, email).or().eq(AdwebEnquiryBlacklist::getPhone, phone));
         return this.count(queryWrapper) > 0;
         return this.count(queryWrapper) > 0;
     }
     }
 }
 }

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

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

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

@@ -1,6 +1,6 @@
 package org.jeecg.modules.adweb.enquiry.service.impl;
 package org.jeecg.modules.adweb.enquiry.service.impl;
 
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -40,10 +40,10 @@ public class AdwebSiteBlackEmailServiceImpl extends ServiceImpl<AdwebSiteBlackEm
      */
      */
     @Override
     @Override
     public void saveRedisSiteBlackEmailBySiteId(Integer siteId, Integer blackOrWhite) {
     public void saveRedisSiteBlackEmailBySiteId(Integer siteId, Integer blackOrWhite) {
-        QueryWrapper<AdwebSiteBlackEmail> siteAllEmailQueryWrapper = new QueryWrapper<>();
-        siteAllEmailQueryWrapper.ne("status", 0);
-        siteAllEmailQueryWrapper.eq("site_id", siteId);
-        siteAllEmailQueryWrapper.eq("black_or_white", blackOrWhite);
+        LambdaQueryWrapper<AdwebSiteBlackEmail> siteAllEmailQueryWrapper = new LambdaQueryWrapper<>();
+        siteAllEmailQueryWrapper.ne(AdwebSiteBlackEmail::getStatus, 0);
+        siteAllEmailQueryWrapper.eq(AdwebSiteBlackEmail::getSiteId, siteId);
+        siteAllEmailQueryWrapper.eq(AdwebSiteBlackEmail::getBlackOrWhite, blackOrWhite);
         List<AdwebSiteBlackEmail> allEmailList = list(siteAllEmailQueryWrapper);
         List<AdwebSiteBlackEmail> allEmailList = list(siteAllEmailQueryWrapper);
         if (CollectionUtils.isEmpty(allEmailList)) {
         if (CollectionUtils.isEmpty(allEmailList)) {
             log.warn("未获取到对应站点的名单数据");
             log.warn("未获取到对应站点的名单数据");
@@ -81,9 +81,9 @@ public class AdwebSiteBlackEmailServiceImpl extends ServiceImpl<AdwebSiteBlackEm
      */
      */
     @Override
     @Override
     public Map<String, List<String>> getSiteBlackEmailListBySiteId(Integer siteId) {
     public Map<String, List<String>> getSiteBlackEmailListBySiteId(Integer siteId) {
-        QueryWrapper<AdwebSiteBlackEmail> siteAllEmailQueryWrapper = new QueryWrapper<>();
-        siteAllEmailQueryWrapper.ne("status", 0);
-        siteAllEmailQueryWrapper.eq("site_id", siteId);
+        LambdaQueryWrapper<AdwebSiteBlackEmail> siteAllEmailQueryWrapper = new LambdaQueryWrapper<>();
+        siteAllEmailQueryWrapper.ne(AdwebSiteBlackEmail::getStatus, 0);
+        siteAllEmailQueryWrapper.eq(AdwebSiteBlackEmail::getSiteId, siteId);
         List<AdwebSiteBlackEmail> allEmailList = list(siteAllEmailQueryWrapper);
         List<AdwebSiteBlackEmail> allEmailList = list(siteAllEmailQueryWrapper);
         if (CollectionUtils.isEmpty(allEmailList)) {
         if (CollectionUtils.isEmpty(allEmailList)) {
             log.warn("未获取到对应站点的黑白名单数据");
             log.warn("未获取到对应站点的黑白名单数据");
@@ -136,11 +136,11 @@ public class AdwebSiteBlackEmailServiceImpl extends ServiceImpl<AdwebSiteBlackEm
     @Override
     @Override
     public void addBlackEmailByContent(EffectiveEnquiryParamDto effectiveEnquiryParamDto) {
     public void addBlackEmailByContent(EffectiveEnquiryParamDto effectiveEnquiryParamDto) {
         //排查添加的邮箱是否已有
         //排查添加的邮箱是否已有
-        QueryWrapper<AdwebSiteBlackEmail> enquirySiteBlackEmailQueryWrapper = new QueryWrapper<>();
-        enquirySiteBlackEmailQueryWrapper.eq("email", effectiveEnquiryParamDto.getWasteEnquirySeason());
-        enquirySiteBlackEmailQueryWrapper.eq("site_id", effectiveEnquiryParamDto.getSiteId());
-        enquirySiteBlackEmailQueryWrapper.eq("site_code", effectiveEnquiryParamDto.getSiteCode());
-        enquirySiteBlackEmailQueryWrapper.eq("status", 1);
+        LambdaQueryWrapper<AdwebSiteBlackEmail> enquirySiteBlackEmailQueryWrapper = new LambdaQueryWrapper<>();
+        enquirySiteBlackEmailQueryWrapper.eq(AdwebSiteBlackEmail::getEmail, effectiveEnquiryParamDto.getWasteEnquirySeason());
+        enquirySiteBlackEmailQueryWrapper.eq(AdwebSiteBlackEmail::getSiteId, effectiveEnquiryParamDto.getSiteId());
+        enquirySiteBlackEmailQueryWrapper.eq(AdwebSiteBlackEmail::getSiteCode, effectiveEnquiryParamDto.getSiteCode());
+        enquirySiteBlackEmailQueryWrapper.eq(AdwebSiteBlackEmail::getStatus, 1);
         List<AdwebSiteBlackEmail> enquirySiteBlackEmailList = list(enquirySiteBlackEmailQueryWrapper);
         List<AdwebSiteBlackEmail> enquirySiteBlackEmailList = list(enquirySiteBlackEmailQueryWrapper);
         if (CollectionUtils.isNotEmpty(enquirySiteBlackEmailList)) {
         if (CollectionUtils.isNotEmpty(enquirySiteBlackEmailList)) {
             //如果有白名单 先删除原数据,后添加新的黑名单数据
             //如果有白名单 先删除原数据,后添加新的黑名单数据

+ 27 - 22
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/seo/controller/SeoKeywordsController.java

@@ -1,19 +1,26 @@
 package org.jeecg.modules.adweb.seo.controller;
 package org.jeecg.modules.adweb.seo.controller;
 
 
+import static cn.hutool.core.collection.CollUtil.distinct;
+
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.io.IoUtil;
 import cn.hutool.core.io.IoUtil;
 import cn.hutool.poi.excel.ExcelUtil;
 import cn.hutool.poi.excel.ExcelUtil;
 import cn.hutool.poi.excel.ExcelWriter;
 import cn.hutool.poi.excel.ExcelWriter;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xkcoding.http.util.StringUtil;
 import com.xkcoding.http.util.StringUtil;
+
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import io.swagger.v3.oas.annotations.tags.Tag;
+
 import jakarta.servlet.ServletOutputStream;
 import jakarta.servlet.ServletOutputStream;
 import jakarta.servlet.http.HttpServletRequest;
 import jakarta.servlet.http.HttpServletRequest;
 import jakarta.servlet.http.HttpServletResponse;
 import jakarta.servlet.http.HttpServletResponse;
+
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
+
 import org.apache.commons.lang.RandomStringUtils;
 import org.apache.commons.lang.RandomStringUtils;
 import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.ss.usermodel.Sheet;
@@ -50,8 +57,6 @@ import java.nio.charset.StandardCharsets;
 import java.text.SimpleDateFormat;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.*;
 
 
-import static cn.hutool.core.collection.CollUtil.distinct;
-
 /**
 /**
  * @Description: 关键词 @Author: jeecg-boot @Date: 2024-10-15 @Version: V1.0
  * @Description: 关键词 @Author: jeecg-boot @Date: 2024-10-15 @Version: V1.0
  */
  */
@@ -101,18 +106,18 @@ public class SeoKeywordsController extends JeecgController<SeoKeywords, ISeoKeyw
         if ((seoKeywords.getSiteCode() == null || seoKeywords.getSiteCode().isEmpty())) {
         if ((seoKeywords.getSiteCode() == null || seoKeywords.getSiteCode().isEmpty())) {
             return Result.OK();
             return Result.OK();
         }
         }
-        QueryWrapper<SeoKeywords> queryWrapper = new QueryWrapper<>();
+        LambdaQueryWrapper<SeoKeywords> queryWrapper = new LambdaQueryWrapper<>();
         if (StringUtil.isNotEmpty(seoKeywords.getKeywords())) {
         if (StringUtil.isNotEmpty(seoKeywords.getKeywords())) {
-            queryWrapper.like("keywords", "%" + seoKeywords.getKeywords() + "%");
+            queryWrapper.like(SeoKeywords::getKeywords, "%" + seoKeywords.getKeywords() + "%");
         }
         }
 //        queryWrapper.eq("related_keyword_id", seoKeywords.getRelatedKeywordId());
 //        queryWrapper.eq("related_keyword_id", seoKeywords.getRelatedKeywordId());
 //        queryWrapper.eq("subscription_id", seoKeywords.getSubscriptionId());
 //        queryWrapper.eq("subscription_id", seoKeywords.getSubscriptionId());
-        queryWrapper.eq("site_code", seoKeywords.getSiteCode());
+        queryWrapper.eq(SeoKeywords::getSiteCode, seoKeywords.getSiteCode());
         if (seoKeywords.getKeywordType() != null) {
         if (seoKeywords.getKeywordType() != null) {
-            queryWrapper.eq("keyword_type", seoKeywords.getKeywordType());
+            queryWrapper.eq(SeoKeywords::getKeywordType, seoKeywords.getKeywordType());
         }
         }
-        queryWrapper.ne("status", 0);
-        queryWrapper.orderByAsc("priority").orderByDesc("optimize_process").orderByDesc("create_time");
+        queryWrapper.ne(SeoKeywords::getStatus, 0);
+        queryWrapper.orderByAsc(SeoKeywords::getPriority).orderByDesc(SeoKeywords::getOptimizeProcess).orderByDesc(SeoKeywords::getCreateTime);
         Page<SeoKeywords> page = new Page<SeoKeywords>(pageNo, pageSize);
         Page<SeoKeywords> page = new Page<SeoKeywords>(pageNo, pageSize);
         IPage<SeoKeywords> pageList = seoKeywordsService.page(page, queryWrapper);
         IPage<SeoKeywords> pageList = seoKeywordsService.page(page, queryWrapper);
         return Result.OK(pageList);
         return Result.OK(pageList);
@@ -471,10 +476,10 @@ public class SeoKeywordsController extends JeecgController<SeoKeywords, ISeoKeyw
                 Integer originalSize = list.size();
                 Integer originalSize = list.size();
                 List<SeoKeywords> listNew = distinct(list);
                 List<SeoKeywords> listNew = distinct(list);
                 // 去重
                 // 去重
-                QueryWrapper<SeoKeywords> queryWrapper = new QueryWrapper<>();
-                queryWrapper.eq("site_code", site.getCode());
-                queryWrapper.ne("status", 0);
-                queryWrapper.eq("subscription_id", currentSeoAndSiteSubscription.getId());
+                LambdaQueryWrapper<SeoKeywords> queryWrapper = new LambdaQueryWrapper<>();
+                queryWrapper.eq(SeoKeywords::getSiteCode, site.getCode());
+                queryWrapper.ne(SeoKeywords::getStatus, 0);
+                queryWrapper.eq(SeoKeywords::getSubscriptionId, currentSeoAndSiteSubscription.getId());
                 List<SeoKeywords> existingKeywordList = seoKeywordsService.list(queryWrapper);
                 List<SeoKeywords> existingKeywordList = seoKeywordsService.list(queryWrapper);
                 if (CollectionUtil.isNotEmpty(existingKeywordList)) {
                 if (CollectionUtil.isNotEmpty(existingKeywordList)) {
                     List<String> existingKeywords = new ArrayList<>();
                     List<String> existingKeywords = new ArrayList<>();
@@ -521,11 +526,11 @@ public class SeoKeywordsController extends JeecgController<SeoKeywords, ISeoKeyw
      */
      */
     @GetMapping(value = "/getSeoKeyword")
     @GetMapping(value = "/getSeoKeyword")
     public Result<?> getSeoKeyword(SeoKeywords seoKeywords) {
     public Result<?> getSeoKeyword(SeoKeywords seoKeywords) {
-        QueryWrapper<SeoKeywords> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("keywords", seoKeywords.getKeywords());
-        queryWrapper.eq("site_code", seoKeywords.getSiteCode());
-        queryWrapper.ne("status", 0);
-        queryWrapper.eq("subscription_id", seoKeywords.getSubscriptionId());
+        LambdaQueryWrapper<SeoKeywords> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(SeoKeywords::getKeywords, seoKeywords.getKeywords());
+        queryWrapper.eq(SeoKeywords::getSiteCode, seoKeywords.getSiteCode());
+        queryWrapper.ne(SeoKeywords::getStatus, 0);
+        queryWrapper.eq(SeoKeywords::getSubscriptionId, seoKeywords.getSubscriptionId());
         List<SeoKeywords> seoKeywordsList = seoKeywordsService.list(queryWrapper);
         List<SeoKeywords> seoKeywordsList = seoKeywordsService.list(queryWrapper);
         if (!seoKeywordsList.isEmpty()) {
         if (!seoKeywordsList.isEmpty()) {
             return Result.OK(false);
             return Result.OK(false);
@@ -548,10 +553,10 @@ public class SeoKeywordsController extends JeecgController<SeoKeywords, ISeoKeyw
         SeoKeywords temp = seoKeywordsService.getById(id);
         SeoKeywords temp = seoKeywordsService.getById(id);
         // 改为指定关键词时,判断是否是别的关键词的相关关键词,改为长尾关键词时,判断是否具有相关关键词
         // 改为指定关键词时,判断是否是别的关键词的相关关键词,改为长尾关键词时,判断是否具有相关关键词
         if (type == 2) {
         if (type == 2) {
-            QueryWrapper<SeoKeywords> queryWrapper2 = new QueryWrapper<>();
-            queryWrapper2.ne("status", 0);
-            queryWrapper2.eq("subscription_id", temp.getSubscriptionId());
-            queryWrapper2.eq("related_keyword_id", id);
+            LambdaQueryWrapper<SeoKeywords> queryWrapper2 = new LambdaQueryWrapper<>();
+            queryWrapper2.ne(SeoKeywords::getStatus, 0);
+            queryWrapper2.eq(SeoKeywords::getSubscriptionId, temp.getSubscriptionId());
+            queryWrapper2.eq(SeoKeywords::getRelatedKeywordId, id);
             if (seoKeywordsService.count(queryWrapper2) > 0) {
             if (seoKeywordsService.count(queryWrapper2) > 0) {
                 return Result.error("此关键词已经关联长尾词!");
                 return Result.error("此关键词已经关联长尾词!");
             }
             }

+ 18 - 19
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/seo/service/impl/SeoKeywordsRankServiceImpl.java

@@ -1,7 +1,6 @@
 package org.jeecg.modules.adweb.seo.service.impl;
 package org.jeecg.modules.adweb.seo.service.impl;
 
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.xkcoding.http.util.StringUtil;
 import com.xkcoding.http.util.StringUtil;
 import jakarta.annotation.Resource;
 import jakarta.annotation.Resource;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
@@ -74,17 +73,17 @@ public class SeoKeywordsRankServiceImpl implements ISeoKeywordsRankService {
         List<AdwebSite> siteList = null;
         List<AdwebSite> siteList = null;
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
 
 
-        QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
-        queryWrapper.select("id", "name", "code");
-        queryWrapper.orderByDesc("create_time");
-        queryWrapper.eq("status", AdwebConstant.STATUS).isNull("parent_group_code");
+        LambdaQueryWrapper<AdwebSite> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.select(AdwebSite::getId, AdwebSite::getName, AdwebSite::getCode);
+        queryWrapper.orderByDesc(AdwebSite::getCreateTime);
+        queryWrapper.eq(AdwebSite::getStatus, AdwebConstant.STATUS).isNull(AdwebSite::getParentGroupCode);
         if (sysAdwebApi.isChannelAdmin()) {
         if (sysAdwebApi.isChannelAdmin()) {
             List<String> channelGroupUids = sysAdwebApi.getChannelGroupUids();
             List<String> channelGroupUids = sysAdwebApi.getChannelGroupUids();
             List<String> codeList = siteUserPermissionService.getSiteCodeListByUids(channelGroupUids);
             List<String> codeList = siteUserPermissionService.getSiteCodeListByUids(channelGroupUids);
-            queryWrapper.in("code", codeList);
+            queryWrapper.in(AdwebSite::getCode, codeList);
         } else if (!sysAdwebApi.isAdmin()) {
         } else if (!sysAdwebApi.isAdmin()) {
             List<String> codeList = siteUserPermissionService.getSiteCodeList(sysUser.getId());
             List<String> codeList = siteUserPermissionService.getSiteCodeList(sysUser.getId());
-            queryWrapper.in("code", codeList);
+            queryWrapper.in(AdwebSite::getCode, codeList);
         }
         }
         siteList = adwebSiteService.list(queryWrapper);
         siteList = adwebSiteService.list(queryWrapper);
         this.setPlanName(siteList);
         this.setPlanName(siteList);
@@ -104,10 +103,10 @@ public class SeoKeywordsRankServiceImpl implements ISeoKeywordsRankService {
             siteIds.add(site.getId());
             siteIds.add(site.getId());
         }
         }
 
 
-        QueryWrapper<SeoPlanSubscription> historyQueryWrapper = new QueryWrapper<>();
-        historyQueryWrapper.select("id", "plan_id", "site_id", "plan_name", "plan_type");
-        historyQueryWrapper.in("site_id", siteIds);
-        historyQueryWrapper.eq("status", 1);
+        LambdaQueryWrapper<SeoPlanSubscription> historyQueryWrapper = new LambdaQueryWrapper<>();
+        historyQueryWrapper.select(SeoPlanSubscription::getId, SeoPlanSubscription::getPlanId, SeoPlanSubscription::getSiteId, SeoPlanSubscription::getPlanName, SeoPlanSubscription::getPlanType);
+        historyQueryWrapper.in(SeoPlanSubscription::getSiteId, siteIds);
+        historyQueryWrapper.eq(SeoPlanSubscription::getStatus, 1);
         List<SeoPlanSubscription> seoPlanSubscriptions = seoPlanSubscriptionService.list(historyQueryWrapper);
         List<SeoPlanSubscription> seoPlanSubscriptions = seoPlanSubscriptionService.list(historyQueryWrapper);
         if (CollectionUtils.isEmpty(seoPlanSubscriptions)) {
         if (CollectionUtils.isEmpty(seoPlanSubscriptions)) {
             return;
             return;
@@ -147,16 +146,16 @@ public class SeoKeywordsRankServiceImpl implements ISeoKeywordsRankService {
         }
         }
         // 添加站点数据
         // 添加站点数据
         // 1.获取站点指定词数量
         // 1.获取站点指定词数量
-        QueryWrapper<SeoKeywords> seoKeywordsQueryWrapper = new QueryWrapper<>();
-        seoKeywordsQueryWrapper.eq("site_code", siteCode);
-        seoKeywordsQueryWrapper.eq("status", 1);
-        seoKeywordsQueryWrapper.eq("keyword_type", 1);
+        LambdaQueryWrapper<SeoKeywords> seoKeywordsQueryWrapper = new LambdaQueryWrapper<>();
+        seoKeywordsQueryWrapper.eq(SeoKeywords::getSiteCode, siteCode);
+        seoKeywordsQueryWrapper.eq(SeoKeywords::getStatus, 1);
+        seoKeywordsQueryWrapper.eq(SeoKeywords::getKeywordType, 1);
         Long appointKeywordNum = seoKeywordsMapper.selectCount(seoKeywordsQueryWrapper);
         Long appointKeywordNum = seoKeywordsMapper.selectCount(seoKeywordsQueryWrapper);
         // 2.获取站点关键词数量
         // 2.获取站点关键词数量
-        QueryWrapper<SeoKeywords> seoKeywordsQueryWrapper1 = new QueryWrapper<>();
-        seoKeywordsQueryWrapper1.eq("site_code", siteCode);
-        seoKeywordsQueryWrapper1.eq("status", 1);
-        seoKeywordsQueryWrapper1.eq("keyword_type", 2);
+        LambdaQueryWrapper<SeoKeywords> seoKeywordsQueryWrapper1 = new LambdaQueryWrapper<>();
+        seoKeywordsQueryWrapper1.eq(SeoKeywords::getSiteCode, siteCode);
+        seoKeywordsQueryWrapper1.eq(SeoKeywords::getStatus, 1);
+        seoKeywordsQueryWrapper1.eq(SeoKeywords::getKeywordType, 2);
         Long longTailKeywordNum = seoKeywordsMapper.selectCount(seoKeywordsQueryWrapper1);
         Long longTailKeywordNum = seoKeywordsMapper.selectCount(seoKeywordsQueryWrapper1);
         comprehensiveStatistics.setAppointKeywordNum(Math.toIntExact(appointKeywordNum));
         comprehensiveStatistics.setAppointKeywordNum(Math.toIntExact(appointKeywordNum));
         comprehensiveStatistics.setLongTailKeywordNum(Math.toIntExact(longTailKeywordNum));
         comprehensiveStatistics.setLongTailKeywordNum(Math.toIntExact(longTailKeywordNum));

+ 14 - 15
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/seo/service/impl/SeoPlanSubscriptionServiceImpl.java

@@ -3,7 +3,6 @@ package org.jeecg.modules.adweb.seo.service.impl;
 import cn.hutool.core.date.DateTime;
 import cn.hutool.core.date.DateTime;
 import cn.hutool.core.date.DateUnit;
 import cn.hutool.core.date.DateUnit;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import jakarta.annotation.Resource;
 import jakarta.annotation.Resource;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.CollectionUtils;
@@ -49,9 +48,9 @@ public class SeoPlanSubscriptionServiceImpl extends ServiceImpl<SeoPlanSubscript
 
 
         //如果不是续费客户(就是新客户)的话,直接入库,套餐开启时间即是现在
         //如果不是续费客户(就是新客户)的话,直接入库,套餐开启时间即是现在
         if (seoPurchaseHistory.getIsRenew() == null || seoPurchaseHistory.getIsRenew() == 0) {
         if (seoPurchaseHistory.getIsRenew() == null || seoPurchaseHistory.getIsRenew() == 0) {
-            QueryWrapper<SeoPlanSubscription> queryWrapper = new QueryWrapper<>();
-            queryWrapper.eq("site_id", seoPurchaseHistory.getSiteId());
-            queryWrapper.eq("status", 1);
+            LambdaQueryWrapper<SeoPlanSubscription> queryWrapper = new LambdaQueryWrapper<>();
+            queryWrapper.eq(SeoPlanSubscription::getSiteId, seoPurchaseHistory.getSiteId());
+            queryWrapper.eq(SeoPlanSubscription::getStatus, 1);
             List<SeoPlanSubscription> seoPurchaseHistoryList = this.list(queryWrapper);
             List<SeoPlanSubscription> seoPurchaseHistoryList = this.list(queryWrapper);
             if (!CollectionUtils.isEmpty(seoPurchaseHistoryList)) {
             if (!CollectionUtils.isEmpty(seoPurchaseHistoryList)) {
                 return Result.error("站点存在使用中套餐,请到期后绑定!");
                 return Result.error("站点存在使用中套餐,请到期后绑定!");
@@ -59,16 +58,16 @@ public class SeoPlanSubscriptionServiceImpl extends ServiceImpl<SeoPlanSubscript
             result = this.addNewSubscription(seoPurchaseHistory, marketPlan);
             result = this.addNewSubscription(seoPurchaseHistory, marketPlan);
         } else {//续费
         } else {//续费
             //判断是否有正在使用的套餐,如果没有,新建status为1的套餐
             //判断是否有正在使用的套餐,如果没有,新建status为1的套餐
-            QueryWrapper<SeoPlanSubscription> oldQueryWrapper = new QueryWrapper<>();
-            oldQueryWrapper.eq("site_id", seoPurchaseHistory.getSiteId());
-            oldQueryWrapper.eq("status", 1);
+            LambdaQueryWrapper<SeoPlanSubscription> oldQueryWrapper = new LambdaQueryWrapper<>();
+            oldQueryWrapper.eq(SeoPlanSubscription::getSiteId, seoPurchaseHistory.getSiteId());
+            oldQueryWrapper.eq(SeoPlanSubscription::getStatus, 1);
             List<SeoPlanSubscription> oldHistoryList = this.list(oldQueryWrapper);
             List<SeoPlanSubscription> oldHistoryList = this.list(oldQueryWrapper);
             if (CollectionUtils.isEmpty(oldHistoryList)) {
             if (CollectionUtils.isEmpty(oldHistoryList)) {
                 return Result.error("站点不存在使用中套餐,请先新增套餐");
                 return Result.error("站点不存在使用中套餐,请先新增套餐");
             } else {
             } else {
-                QueryWrapper<SeoPlanSubscription> queryWrapper = new QueryWrapper<>();
-                queryWrapper.eq("site_id", seoPurchaseHistory.getSiteId());
-                queryWrapper.eq("status", 2);
+                LambdaQueryWrapper<SeoPlanSubscription> queryWrapper = new LambdaQueryWrapper<>();
+                queryWrapper.eq(SeoPlanSubscription::getSiteId, seoPurchaseHistory.getSiteId());
+                queryWrapper.eq(SeoPlanSubscription::getStatus, 2);
                 List<SeoPlanSubscription> seoPurchaseHistoryList = this.list(queryWrapper);
                 List<SeoPlanSubscription> seoPurchaseHistoryList = this.list(queryWrapper);
                 if (!CollectionUtils.isEmpty(seoPurchaseHistoryList)) {
                 if (!CollectionUtils.isEmpty(seoPurchaseHistoryList)) {
                     return Result.error("同一站点不能同时续费多个相同类型的套餐!");
                     return Result.error("同一站点不能同时续费多个相同类型的套餐!");
@@ -150,11 +149,11 @@ public class SeoPlanSubscriptionServiceImpl extends ServiceImpl<SeoPlanSubscript
      */
      */
     @Override
     @Override
     public SeoPlanSubscription getCurrentSeoAndSiteSubscription(Integer siteId) {
     public SeoPlanSubscription getCurrentSeoAndSiteSubscription(Integer siteId) {
-        QueryWrapper<SeoPlanSubscription> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("site_id", siteId);
-        queryWrapper.and(wrapper -> wrapper.eq("plan_type", "SEO").or().eq("plan_type", "STATIONCONSTRUCTION"));
-        queryWrapper.in("status", Arrays.asList(1, -1));
-        queryWrapper.orderByDesc("status", "create_time");
+        LambdaQueryWrapper<SeoPlanSubscription> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(SeoPlanSubscription::getSiteId, siteId);
+        queryWrapper.and(wrapper -> wrapper.eq(SeoPlanSubscription::getPlanType, "SEO").or().eq(SeoPlanSubscription::getPlanType, "STATIONCONSTRUCTION"));
+        queryWrapper.in(SeoPlanSubscription::getStatus, Arrays.asList(1, -1));
+        queryWrapper.orderByDesc(SeoPlanSubscription::getStatus, SeoPlanSubscription::getCreateTime);
         List<SeoPlanSubscription> histories = this.list(queryWrapper);
         List<SeoPlanSubscription> histories = this.list(queryWrapper);
         if (CollectionUtils.isNotEmpty(histories)) {
         if (CollectionUtils.isNotEmpty(histories)) {
             return histories.get(0);
             return histories.get(0);

+ 4 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/site/controller/AdwebSiteManageController.java

@@ -3,7 +3,7 @@ package org.jeecg.modules.adweb.site.controller;
 
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.bean.BeanUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import jakarta.annotation.Resource;
 import jakarta.annotation.Resource;
@@ -97,8 +97,8 @@ public class AdwebSiteManageController extends JeecgController<AdwebSite, IAdweb
             // 如果是渠道管理员,则返回渠道下所有adwebVIP用户
             // 如果是渠道管理员,则返回渠道下所有adwebVIP用户
             // 而对于普通adwebVIP用户,只返回该用户自己
             // 而对于普通adwebVIP用户,只返回该用户自己
             if (sysAdwebApi.isChannelAdmin()) {
             if (sysAdwebApi.isChannelAdmin()) {
-                QueryWrapper<SysUserTenant> queryWrapper = new QueryWrapper<>();
-                queryWrapper.in("tenant_id", user.getRelTenantIds());
+                LambdaUpdateWrapper<SysUserTenant> queryWrapper = new LambdaUpdateWrapper<>();
+                queryWrapper.in(SysUserTenant::getTenantId, user.getRelTenantIds());
 
 
                 // 查询出和登录用户具有相同租户的userID
                 // 查询出和登录用户具有相同租户的userID
                 List<SysUserTenant> sysUserTenants = sysUserTenantService.getBaseMapper().selectList(queryWrapper);
                 List<SysUserTenant> sysUserTenants = sysUserTenantService.getBaseMapper().selectList(queryWrapper);
@@ -158,7 +158,7 @@ public class AdwebSiteManageController extends JeecgController<AdwebSite, IAdweb
         // 去除邮箱前后空格
         // 去除邮箱前后空格
         emailList.replaceAll(String::trim);
         emailList.replaceAll(String::trim);
 
 
-        int count = (int) adwebSiteManageService.count(new QueryWrapper<AdwebSite>().eq("code", siteCode));
+        int count = (int) adwebSiteManageService.count(new LambdaQueryWrapper<AdwebSite>().eq(AdwebSite::getCode, siteCode));
         if (count == 0) {
         if (count == 0) {
             return Result.error("站点不存在");
             return Result.error("站点不存在");
         }
         }

+ 4 - 5
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/site/service/impl/AdwebSiteServiceImpl.java

@@ -1,7 +1,6 @@
 package org.jeecg.modules.adweb.site.service.impl;
 package org.jeecg.modules.adweb.site.service.impl;
 
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.xkcoding.http.util.StringUtil;
 import com.xkcoding.http.util.StringUtil;
@@ -169,8 +168,8 @@ public class AdwebSiteServiceImpl extends ServiceImpl<AdwebSiteMapper, AdwebSite
         }
         }
 
 
         String code = adwebSite.getParentGroupCode();
         String code = adwebSite.getParentGroupCode();
-        QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("code", code).or().eq("parent_code", code);
+        LambdaQueryWrapper<AdwebSite> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(AdwebSite::getCode, code).or().eq(AdwebSite::getParentCode, code);
         List<AdwebSite> siteList = this.list(queryWrapper);
         List<AdwebSite> siteList = this.list(queryWrapper);
         List<Integer> siteIds = new ArrayList<>();
         List<Integer> siteIds = new ArrayList<>();
         for (AdwebSite site : siteList) {
         for (AdwebSite site : siteList) {
@@ -188,8 +187,8 @@ public class AdwebSiteServiceImpl extends ServiceImpl<AdwebSiteMapper, AdwebSite
     @Override
     @Override
     public List<Integer> getAllSiteIdByParentId(Integer parentId) {
     public List<Integer> getAllSiteIdByParentId(Integer parentId) {
         String siteCode = this.getSiteCodeById(parentId);
         String siteCode = this.getSiteCodeById(parentId);
-        QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("code", siteCode).or().eq("parent_code", siteCode);
+        LambdaQueryWrapper<AdwebSite> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(AdwebSite::getCode, siteCode).or().eq(AdwebSite::getParentCode, siteCode);
         List<AdwebSite> siteList = this.list(queryWrapper);
         List<AdwebSite> siteList = this.list(queryWrapper);
         List<Integer> siteIds = new ArrayList<>();
         List<Integer> siteIds = new ArrayList<>();
         for (AdwebSite site : siteList) {
         for (AdwebSite site : siteList) {

+ 6 - 7
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/site/service/impl/AdwebUserWpsiteServiceImpl.java

@@ -2,7 +2,6 @@ package org.jeecg.modules.adweb.site.service.impl;
 
 
 
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import jakarta.annotation.Resource;
 import jakarta.annotation.Resource;
 import org.jeecg.modules.adweb.site.entity.AdwebUserWpsite;
 import org.jeecg.modules.adweb.site.entity.AdwebUserWpsite;
@@ -41,9 +40,9 @@ public class AdwebUserWpsiteServiceImpl extends ServiceImpl<AdwebUserWpsiteMappe
 
 
     @Override
     @Override
     public List<AdwebUserWpsite> getByUserID(String userId) {
     public List<AdwebUserWpsite> getByUserID(String userId) {
-        QueryWrapper<AdwebUserWpsite> adwebUserWpsiteQueryWrapper = new QueryWrapper<>();
-        adwebUserWpsiteQueryWrapper.eq("uid",userId);
-        adwebUserWpsiteQueryWrapper.eq("status", NumConstant.ONE);
+        LambdaQueryWrapper<AdwebUserWpsite> adwebUserWpsiteQueryWrapper = new LambdaQueryWrapper<>();
+        adwebUserWpsiteQueryWrapper.eq(AdwebUserWpsite::getUid, userId);
+        adwebUserWpsiteQueryWrapper.eq(AdwebUserWpsite::getStatus, NumConstant.ONE);
         List<AdwebUserWpsite> adwebUserWpsites = this.list(adwebUserWpsiteQueryWrapper);
         List<AdwebUserWpsite> adwebUserWpsites = this.list(adwebUserWpsiteQueryWrapper);
         return adwebUserWpsites;
         return adwebUserWpsites;
     }
     }
@@ -55,9 +54,9 @@ public class AdwebUserWpsiteServiceImpl extends ServiceImpl<AdwebUserWpsiteMappe
      */
      */
     @Override
     @Override
     public List<AdwebUserWpsite> getUserBySiteId(Integer siteId) {
     public List<AdwebUserWpsite> getUserBySiteId(Integer siteId) {
-        QueryWrapper<AdwebUserWpsite> adwebUserWpsiteQueryWrapper = new QueryWrapper<>();
-        adwebUserWpsiteQueryWrapper.eq("site_id",siteId);
-        adwebUserWpsiteQueryWrapper.eq("status", NumConstant.ONE);
+        LambdaQueryWrapper<AdwebUserWpsite> adwebUserWpsiteQueryWrapper = new LambdaQueryWrapper<>();
+        adwebUserWpsiteQueryWrapper.eq(AdwebUserWpsite::getSiteId, siteId);
+        adwebUserWpsiteQueryWrapper.eq(AdwebUserWpsite::getStatus, NumConstant.ONE);
         return this.list(adwebUserWpsiteQueryWrapper);
         return this.list(adwebUserWpsiteQueryWrapper);
     }
     }
 }
 }

+ 7 - 6
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/subscribePlan/controller/SubscribePlanController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.adweb.subscribePlan.controller;
 package org.jeecg.modules.adweb.subscribePlan.controller;
 
 
 import cn.hutool.core.util.RandomUtil;
 import cn.hutool.core.util.RandomUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -76,10 +77,10 @@ public class SubscribePlanController extends JeecgController<SubscribePlan, ISub
     public Result<String> add(@RequestBody SubscribePlan subscribePlan) {
     public Result<String> add(@RequestBody SubscribePlan subscribePlan) {
 
 
         subscribePlan.setCreateTime(new Date());
         subscribePlan.setCreateTime(new Date());
-        QueryWrapper<SubscribePlan> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("market_type", subscribePlan.getMarketType());
-        queryWrapper.eq("plan_name", subscribePlan.getPlanName());
-        queryWrapper.ne("status", 0);
+        LambdaQueryWrapper<SubscribePlan> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(SubscribePlan::getMarketType, subscribePlan.getMarketType());
+        queryWrapper.eq(SubscribePlan::getPlanName, subscribePlan.getPlanName());
+        queryWrapper.ne(SubscribePlan::getStatus, 0);
         List<SubscribePlan> seoMarketPlans = seoMarketPlanService.list(queryWrapper);
         List<SubscribePlan> seoMarketPlans = seoMarketPlanService.list(queryWrapper);
         if (!seoMarketPlans.isEmpty()) {
         if (!seoMarketPlans.isEmpty()) {
             return Result.error("方案名称已存在!");
             return Result.error("方案名称已存在!");
@@ -190,8 +191,8 @@ public class SubscribePlanController extends JeecgController<SubscribePlan, ISub
     private String getPlanCode() {
     private String getPlanCode() {
         String planCode = RandomUtil.randomStringUpper(4);
         String planCode = RandomUtil.randomStringUpper(4);
         planCode = planCode.toUpperCase();
         planCode = planCode.toUpperCase();
-        QueryWrapper<SubscribePlan> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("plan_code", planCode);
+        LambdaQueryWrapper<SubscribePlan> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(SubscribePlan::getPlanCode, planCode);
         int count = (int) seoMarketPlanService.count(queryWrapper);
         int count = (int) seoMarketPlanService.count(queryWrapper);
         return count > 0 ? getPlanCode() : planCode;
         return count > 0 ? getPlanCode() : planCode;
     }
     }

+ 6 - 7
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/system/service/impl/MasterSubAccountRelationServiceImpl.java

@@ -1,7 +1,6 @@
 package org.jeecg.modules.adweb.system.service.impl;
 package org.jeecg.modules.adweb.system.service.impl;
 
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import jakarta.annotation.Resource;
 import jakarta.annotation.Resource;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
@@ -102,9 +101,9 @@ public class MasterSubAccountRelationServiceImpl extends ServiceImpl<MasterSubAc
 
 
         String masterId = uid;
         String masterId = uid;
         if (sysAdwebApi.isAdwebSubVip()) {
         if (sysAdwebApi.isAdwebSubVip()) {
-            QueryWrapper<MasterSubAccountRelation> queryWrapper = new QueryWrapper<>();
-            queryWrapper.eq("sub_id", uid);
-            queryWrapper.eq("status", 1);
+            LambdaQueryWrapper<MasterSubAccountRelation> queryWrapper = new LambdaQueryWrapper<>();
+            queryWrapper.eq(MasterSubAccountRelation::getSubId, uid);
+            queryWrapper.eq(MasterSubAccountRelation::getStatus, 1);
             List<MasterSubAccountRelation> relations = this.list(queryWrapper);
             List<MasterSubAccountRelation> relations = this.list(queryWrapper);
             if (CollectionUtils.isEmpty(relations)) {
             if (CollectionUtils.isEmpty(relations)) {
                 return defaultList;
                 return defaultList;
@@ -112,9 +111,9 @@ public class MasterSubAccountRelationServiceImpl extends ServiceImpl<MasterSubAc
             masterId = relations.get(0).getMasterId();
             masterId = relations.get(0).getMasterId();
         }
         }
 
 
-        QueryWrapper<MasterSubAccountRelation> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("master_id", masterId);
-        queryWrapper.eq("status", 1);
+        LambdaQueryWrapper<MasterSubAccountRelation> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(MasterSubAccountRelation::getMasterId, masterId);
+        queryWrapper.eq(MasterSubAccountRelation::getStatus, 1);
         List<MasterSubAccountRelation> relations = this.list(queryWrapper);
         List<MasterSubAccountRelation> relations = this.list(queryWrapper);
         if (CollectionUtils.isEmpty(relations)) {
         if (CollectionUtils.isEmpty(relations)) {
             return defaultList;
             return defaultList;

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

@@ -1,6 +1,6 @@
 package org.jeecg.modules.adweb.system.service.impl;
 package org.jeecg.modules.adweb.system.service.impl;
 
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.xkcoding.http.util.StringUtil;
 import com.xkcoding.http.util.StringUtil;
 import jakarta.annotation.Resource;
 import jakarta.annotation.Resource;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
@@ -119,19 +119,19 @@ public class SysAdwebApiImpl implements SysAdwebApi {
             return true;
             return true;
         }
         }
 
 
-        QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
+        LambdaQueryWrapper<AdwebSite> queryWrapper = new LambdaQueryWrapper<>();
 
 
         if (this.isChannelAdmin()) {
         if (this.isChannelAdmin()) {
             List<String> channelGroupUids = this.getChannelGroupUids();
             List<String> channelGroupUids = this.getChannelGroupUids();
             List<String> codeList = siteUserPermissionService.getSiteCodeListByUids(channelGroupUids);
             List<String> codeList = siteUserPermissionService.getSiteCodeListByUids(channelGroupUids);
-            queryWrapper.in("code", codeList);
+            queryWrapper.in(AdwebSite::getCode, codeList);
         } else if (!this.isAdmin()) {
         } else if (!this.isAdmin()) {
             LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
             LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
             List<String> codeList = siteUserPermissionService.getSiteCodeList(loginUser.getId());
             List<String> codeList = siteUserPermissionService.getSiteCodeList(loginUser.getId());
-            queryWrapper.in("code", codeList);
+            queryWrapper.in(AdwebSite::getCode, codeList);
         }
         }
-        queryWrapper.eq("id", siteId);
-        queryWrapper.ne("status", NumConstant.ZERO);
+        queryWrapper.eq(AdwebSite::getId, siteId);
+        queryWrapper.ne(AdwebSite::getStatus, NumConstant.ZERO);
         List<AdwebSite> list = adwebSiteService.list(queryWrapper);
         List<AdwebSite> list = adwebSiteService.list(queryWrapper);
         if (CollectionUtils.isNotEmpty(list)) {
         if (CollectionUtils.isNotEmpty(list)) {
             return false;
             return false;
@@ -151,19 +151,19 @@ public class SysAdwebApiImpl implements SysAdwebApi {
         if (StringUtil.isEmpty(siteCode)) {
         if (StringUtil.isEmpty(siteCode)) {
             return true;
             return true;
         }
         }
-        QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
+        LambdaQueryWrapper<AdwebSite> queryWrapper = new LambdaQueryWrapper<>();
 
 
         if (this.isChannelAdmin()) {
         if (this.isChannelAdmin()) {
             List<String> channelGroupUids = this.getChannelGroupUids();
             List<String> channelGroupUids = this.getChannelGroupUids();
             List<String> codeList = siteUserPermissionService.getSiteCodeListByUids(channelGroupUids);
             List<String> codeList = siteUserPermissionService.getSiteCodeListByUids(channelGroupUids);
-            queryWrapper.in("code", codeList);
+            queryWrapper.in(AdwebSite::getCode, codeList);
         } else if (!this.isAdmin()) {
         } else if (!this.isAdmin()) {
             LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
             LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
             List<String> codeList = siteUserPermissionService.getSiteCodeList(loginUser.getId());
             List<String> codeList = siteUserPermissionService.getSiteCodeList(loginUser.getId());
-            queryWrapper.in("code", codeList);
+            queryWrapper.in(AdwebSite::getCode, codeList);
         }
         }
-        queryWrapper.eq("code", siteCode);
-        queryWrapper.ne("status", AdwebConstant.SITE_DEL);
+        queryWrapper.eq(AdwebSite::getCode, siteCode);
+        queryWrapper.ne(AdwebSite::getStatus, AdwebConstant.SITE_DEL);
         List<AdwebSite> list = adwebSiteService.list(queryWrapper);
         List<AdwebSite> list = adwebSiteService.list(queryWrapper);
         if (CollectionUtils.isNotEmpty(list)) {
         if (CollectionUtils.isNotEmpty(list)) {
             return false;
             return false;