wfansh 2 months ago
parent
commit
ec6bc317e5
14 changed files with 112 additions and 109 deletions
  1. BIN
      conf/adweb_v3.sql.zip
  2. 12 11
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/controller/AdwebPublicBlackEmailController.java
  3. 14 14
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/controller/AdwebPublicBlackIpController.java
  4. 4 4
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/controller/AdwebPublicEnquriyRuleController.java
  5. 3 3
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/AdwebOpenApiService.java
  6. 3 3
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/impl/AdwebEnquiryFormServiceImpl.java
  7. 1 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/impl/AdwebEnquiryServiceImpl.java
  8. 11 11
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/impl/AdwebPublicEnquiryRuleServiceImpl.java
  9. 10 10
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/impl/AdwebSiteBlackIpServiceImpl.java
  10. 6 6
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/impl/AdwebSiteEnquiryRuleServiceImpl.java
  11. 10 10
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/impl/EnquiryEmailMessageServiceImpl.java
  12. 10 9
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/site/controller/AdwebSiteController.java
  13. 21 21
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/userCountry/controller/AdwebUserCountryController.java
  14. 7 7
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/userCountry/service/impl/AdwebUserCountryServiceImpl.java

BIN
conf/adweb_v3.sql.zip


+ 12 - 11
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/controller/AdwebPublicBlackEmailController.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.adweb.enquiry.controller;
 
+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.metadata.IPage;
@@ -96,7 +97,7 @@ public class AdwebPublicBlackEmailController extends JeecgController<AdwebPublic
         //将邮箱转换为小写
         enquiryPublicBlackEmail.setEmail(enquiryPublicBlackEmail.getEmail().trim().toLowerCase());
 
-        int count = (int) adwebPublicBlackEmailService.count(new QueryWrapper<AdwebPublicBlackEmail>().ne("status", 0).eq("email", enquiryPublicBlackEmail.getEmail()));
+        int count = (int) adwebPublicBlackEmailService.count(new LambdaQueryWrapper<AdwebPublicBlackEmail>().ne(AdwebPublicBlackEmail::getStatus, 0).eq(AdwebPublicBlackEmail::getEmail, enquiryPublicBlackEmail.getEmail()));
 
         if (count > 0) {
             return Result.error("邮箱已存在");
@@ -105,7 +106,7 @@ public class AdwebPublicBlackEmailController extends JeecgController<AdwebPublic
         enquiryPublicBlackEmail.setStatus(1);
         adwebPublicBlackEmailService.save(enquiryPublicBlackEmail);
 
-        List<AdwebPublicBlackEmail> emailList = adwebPublicBlackEmailService.list(new QueryWrapper<AdwebPublicBlackEmail>().ne("status", 0).eq("black_or_white", 0));
+        List<AdwebPublicBlackEmail> emailList = adwebPublicBlackEmailService.list(new LambdaQueryWrapper<AdwebPublicBlackEmail>().ne(AdwebPublicBlackEmail::getStatus, 0).eq(AdwebPublicBlackEmail::getBlackOrWhite, 0));
 
         if (CollectionUtils.isNotEmpty(emailList)) {
             List<String> collect = emailList.stream().map(AdwebPublicBlackEmail::getEmail).collect(Collectors.toList());
@@ -113,7 +114,7 @@ public class AdwebPublicBlackEmailController extends JeecgController<AdwebPublic
         } else {
             adwebRedisUtil.del(BlackEmailKey);
         }
-        List<AdwebPublicBlackEmail> whiteEmailList = adwebPublicBlackEmailService.list(new QueryWrapper<AdwebPublicBlackEmail>().ne("status", 0).eq("black_or_white", 1));
+        List<AdwebPublicBlackEmail> whiteEmailList = adwebPublicBlackEmailService.list(new LambdaQueryWrapper<AdwebPublicBlackEmail>().ne(AdwebPublicBlackEmail::getStatus, 0).eq(AdwebPublicBlackEmail::getBlackOrWhite, 1));
 
         if (CollectionUtils.isNotEmpty(whiteEmailList)) {
             List<String> collect = whiteEmailList.stream().map(AdwebPublicBlackEmail::getEmail).collect(Collectors.toList());
@@ -142,7 +143,7 @@ public class AdwebPublicBlackEmailController extends JeecgController<AdwebPublic
         //将邮箱转换为小写
         enquiryPublicBlackEmail.setEmail(enquiryPublicBlackEmail.getEmail().trim().toLowerCase());
 
-        int count = (int) adwebPublicBlackEmailService.count(new QueryWrapper<AdwebPublicBlackEmail>().ne("status", 0).eq("email", enquiryPublicBlackEmail.getEmail()).ne("id", enquiryPublicBlackEmail.getId()));
+        int count = (int) adwebPublicBlackEmailService.count(new LambdaQueryWrapper<AdwebPublicBlackEmail>().ne(AdwebPublicBlackEmail::getStatus, 0).eq(AdwebPublicBlackEmail::getEmail, enquiryPublicBlackEmail.getEmail()).ne(AdwebPublicBlackEmail::getId, enquiryPublicBlackEmail.getId()));
 
         if (count > 0) {
             return Result.error("邮箱已存在");
@@ -150,7 +151,7 @@ public class AdwebPublicBlackEmailController extends JeecgController<AdwebPublic
 
         adwebPublicBlackEmailService.updateById(enquiryPublicBlackEmail);
 
-        List<AdwebPublicBlackEmail> emailList = adwebPublicBlackEmailService.list(new QueryWrapper<AdwebPublicBlackEmail>().ne("status", 0).eq("black_or_white", 0));
+        List<AdwebPublicBlackEmail> emailList = adwebPublicBlackEmailService.list(new LambdaQueryWrapper<AdwebPublicBlackEmail>().ne(AdwebPublicBlackEmail::getStatus, 0).eq(AdwebPublicBlackEmail::getBlackOrWhite, 0));
 
         if (CollectionUtils.isNotEmpty(emailList)) {
             List<String> collect = emailList.stream().map(AdwebPublicBlackEmail::getEmail).collect(Collectors.toList());
@@ -158,7 +159,7 @@ public class AdwebPublicBlackEmailController extends JeecgController<AdwebPublic
         } else {
             adwebRedisUtil.del(BlackEmailKey);
         }
-        List<AdwebPublicBlackEmail> whiteEmailList = adwebPublicBlackEmailService.list(new QueryWrapper<AdwebPublicBlackEmail>().ne("status", 0).eq("black_or_white", 1));
+        List<AdwebPublicBlackEmail> whiteEmailList = adwebPublicBlackEmailService.list(new LambdaQueryWrapper<AdwebPublicBlackEmail>().ne(AdwebPublicBlackEmail::getStatus, 0).eq(AdwebPublicBlackEmail::getBlackOrWhite, 1));
 
         if (CollectionUtils.isNotEmpty(whiteEmailList)) {
             List<String> collect = whiteEmailList.stream().map(AdwebPublicBlackEmail::getEmail).collect(Collectors.toList());
@@ -198,7 +199,7 @@ public class AdwebPublicBlackEmailController extends JeecgController<AdwebPublic
         adwebRedisUtil.del(EmailOneDayKey + enquiryPublicBlackEmail.getEmail());
         adwebRedisUtil.del(NotBlackEmailWasteEnquiryKey + enquiryPublicBlackEmail.getEmail());
 
-        List<AdwebPublicBlackEmail> emailList = adwebPublicBlackEmailService.list(new QueryWrapper<AdwebPublicBlackEmail>().ne("status", 0).eq("black_or_white", 0));
+        List<AdwebPublicBlackEmail> emailList = adwebPublicBlackEmailService.list(new LambdaQueryWrapper<AdwebPublicBlackEmail>().ne(AdwebPublicBlackEmail::getStatus, 0).eq(AdwebPublicBlackEmail::getBlackOrWhite, 0));
 
         if (CollectionUtils.isNotEmpty(emailList)) {
             List<String> collect = emailList.stream().map(AdwebPublicBlackEmail::getEmail).collect(Collectors.toList());
@@ -206,7 +207,7 @@ public class AdwebPublicBlackEmailController extends JeecgController<AdwebPublic
         } else {
             adwebRedisUtil.del(BlackEmailKey);
         }
-        List<AdwebPublicBlackEmail> whiteEmailList = adwebPublicBlackEmailService.list(new QueryWrapper<AdwebPublicBlackEmail>().ne("status", 0).eq("black_or_white", 1));
+        List<AdwebPublicBlackEmail> whiteEmailList = adwebPublicBlackEmailService.list(new LambdaQueryWrapper<AdwebPublicBlackEmail>().ne(AdwebPublicBlackEmail::getStatus, 0).eq(AdwebPublicBlackEmail::getBlackOrWhite, 1));
 
         if (CollectionUtils.isNotEmpty(whiteEmailList)) {
             List<String> collect = whiteEmailList.stream().map(AdwebPublicBlackEmail::getEmail).collect(Collectors.toList());
@@ -235,7 +236,7 @@ public class AdwebPublicBlackEmailController extends JeecgController<AdwebPublic
 
         List<String> idList = Arrays.asList(ids.split(","));
 
-        List<AdwebPublicBlackEmail> list = adwebPublicBlackEmailService.list(new QueryWrapper<AdwebPublicBlackEmail>().in("id", idList).ne("status", 0));
+        List<AdwebPublicBlackEmail> list = adwebPublicBlackEmailService.list(new LambdaQueryWrapper<AdwebPublicBlackEmail>().in(AdwebPublicBlackEmail::getId, idList).ne(AdwebPublicBlackEmail::getStatus, 0));
 
         if (list.isEmpty()) {
             return Result.error("未找到对应数据");
@@ -249,7 +250,7 @@ public class AdwebPublicBlackEmailController extends JeecgController<AdwebPublic
             adwebRedisUtil.del(EmailOneDayKey + enquiryPublicBlackEmail.getEmail());
             adwebRedisUtil.del(NotBlackEmailWasteEnquiryKey + enquiryPublicBlackEmail.getEmail());
         }
-        List<AdwebPublicBlackEmail> emailList = adwebPublicBlackEmailService.list(new QueryWrapper<AdwebPublicBlackEmail>().ne("status", 0).eq("black_or_white", 0));
+        List<AdwebPublicBlackEmail> emailList = adwebPublicBlackEmailService.list(new LambdaQueryWrapper<AdwebPublicBlackEmail>().ne(AdwebPublicBlackEmail::getStatus, 0).eq(AdwebPublicBlackEmail::getBlackOrWhite, 0));
 
         if (emailList != null) {
             List<String> collect = emailList.stream().map(AdwebPublicBlackEmail::getEmail).collect(Collectors.toList());
@@ -257,7 +258,7 @@ public class AdwebPublicBlackEmailController extends JeecgController<AdwebPublic
         } else {
             adwebRedisUtil.del(BlackEmailKey);
         }
-        List<AdwebPublicBlackEmail> whiteEmailList = adwebPublicBlackEmailService.list(new QueryWrapper<AdwebPublicBlackEmail>().ne("status", 0).eq("black_or_white", 1));
+        List<AdwebPublicBlackEmail> whiteEmailList = adwebPublicBlackEmailService.list(new LambdaQueryWrapper<AdwebPublicBlackEmail>().ne(AdwebPublicBlackEmail::getStatus, 0).eq(AdwebPublicBlackEmail::getBlackOrWhite, 1));
 
         if (whiteEmailList != null) {
             List<String> collect = whiteEmailList.stream().map(AdwebPublicBlackEmail::getEmail).collect(Collectors.toList());

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

@@ -1,6 +1,6 @@
 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.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -89,7 +89,7 @@ public class AdwebPublicBlackIpController extends JeecgController<AdwebPublicBla
             return Result.error("IP长度不能超过15");
         }
 
-        int count = (int) adwebBlackIpService.count(new QueryWrapper<AdwebPublicBlackIp>().eq("ip", adwebBlackIp.getIp()).eq("status", 1));
+        int count = (int) adwebBlackIpService.count(new LambdaQueryWrapper<AdwebPublicBlackIp>().eq(AdwebPublicBlackIp::getIp, adwebBlackIp.getIp()).eq(AdwebPublicBlackIp::getStatus, 1));
 
         if (count > 0) {
             return Result.error("该IP已存在");
@@ -97,7 +97,7 @@ public class AdwebPublicBlackIpController extends JeecgController<AdwebPublicBla
 
         adwebBlackIp.setStatus(1);
         adwebBlackIpService.save(adwebBlackIp);
-        List<AdwebPublicBlackIp> blackIpList = adwebBlackIpService.list(new QueryWrapper<AdwebPublicBlackIp>().eq("status", 1).eq("black_or_white", 0));
+        List<AdwebPublicBlackIp> blackIpList = adwebBlackIpService.list(new LambdaQueryWrapper<AdwebPublicBlackIp>().eq(AdwebPublicBlackIp::getStatus, 1).eq(AdwebPublicBlackIp::getBlackOrWhite, 0));
 
         if (CollectionUtils.isNotEmpty(blackIpList)) {
             List<String> collect = blackIpList.stream().map(AdwebPublicBlackIp::getIp).collect(Collectors.toList());
@@ -106,7 +106,7 @@ public class AdwebPublicBlackIpController extends JeecgController<AdwebPublicBla
             adwebRedisUtil.del(BlackIpKey);
         }
 
-        List<AdwebPublicBlackIp> whiteIpList = adwebBlackIpService.list(new QueryWrapper<AdwebPublicBlackIp>().eq("status", 1).eq("black_or_white", 1));
+        List<AdwebPublicBlackIp> whiteIpList = adwebBlackIpService.list(new LambdaQueryWrapper<AdwebPublicBlackIp>().eq(AdwebPublicBlackIp::getStatus, 1).eq(AdwebPublicBlackIp::getBlackOrWhite, 1));
 
         if (CollectionUtils.isNotEmpty(whiteIpList)) {
             List<String> collect = whiteIpList.stream().map(AdwebPublicBlackIp::getIp).collect(Collectors.toList());
@@ -135,7 +135,7 @@ public class AdwebPublicBlackIpController extends JeecgController<AdwebPublicBla
             return Result.error("IP长度不能超过15");
         }
 
-        int count = (int) adwebBlackIpService.count(new QueryWrapper<AdwebPublicBlackIp>().eq("ip", adwebBlackIp.getIp()).eq("status", 1).ne("id", adwebBlackIp.getId()));
+        int count = (int) adwebBlackIpService.count(new LambdaQueryWrapper<AdwebPublicBlackIp>().eq(AdwebPublicBlackIp::getIp, adwebBlackIp.getIp()).eq(AdwebPublicBlackIp::getStatus, 1).ne(AdwebPublicBlackIp::getId, adwebBlackIp.getId()));
 
         if (count > 0) {
             return Result.error("该IP已存在");
@@ -143,7 +143,7 @@ public class AdwebPublicBlackIpController extends JeecgController<AdwebPublicBla
 
         adwebBlackIpService.updateById(adwebBlackIp);
 
-        List<AdwebPublicBlackIp> blackIpList = adwebBlackIpService.list(new QueryWrapper<AdwebPublicBlackIp>().eq("status", 1).eq("black_or_white", 0));
+        List<AdwebPublicBlackIp> blackIpList = adwebBlackIpService.list(new LambdaQueryWrapper<AdwebPublicBlackIp>().eq(AdwebPublicBlackIp::getStatus, 1).eq(AdwebPublicBlackIp::getBlackOrWhite, 0));
 
         if (CollectionUtils.isNotEmpty(blackIpList)) {
             List<String> collect = blackIpList.stream().map(AdwebPublicBlackIp::getIp).collect(Collectors.toList());
@@ -152,7 +152,7 @@ public class AdwebPublicBlackIpController extends JeecgController<AdwebPublicBla
             adwebRedisUtil.del(BlackIpKey);
         }
 
-        List<AdwebPublicBlackIp> whiteIpList = adwebBlackIpService.list(new QueryWrapper<AdwebPublicBlackIp>().eq("status", 1).eq("black_or_white", 1));
+        List<AdwebPublicBlackIp> whiteIpList = adwebBlackIpService.list(new LambdaQueryWrapper<AdwebPublicBlackIp>().eq(AdwebPublicBlackIp::getStatus, 1).eq(AdwebPublicBlackIp::getBlackOrWhite, 1));
 
         if (CollectionUtils.isNotEmpty(whiteIpList)) {
             List<String> collect = whiteIpList.stream().map(AdwebPublicBlackIp::getIp).collect(Collectors.toList());
@@ -178,7 +178,7 @@ public class AdwebPublicBlackIpController extends JeecgController<AdwebPublicBla
             return Result.error("ID不能为空");
         }
 
-        List<AdwebPublicBlackIp> list = adwebBlackIpService.list(new QueryWrapper<AdwebPublicBlackIp>().eq("id", id).eq("status", 1));
+        List<AdwebPublicBlackIp> list = adwebBlackIpService.list(new LambdaQueryWrapper<AdwebPublicBlackIp>().eq(AdwebPublicBlackIp::getId, id).eq(AdwebPublicBlackIp::getStatus, 1));
 
         if (list.size() == 0) {
             return Result.error("该IP不存在");
@@ -193,7 +193,7 @@ public class AdwebPublicBlackIpController extends JeecgController<AdwebPublicBla
         adwebRedisUtil.del(IpOneDayKey + adwebBlackIp.getIp());
         adwebRedisUtil.del(NotBlackIpWasteEnquiryKey + adwebBlackIp.getIp());
 
-        List<AdwebPublicBlackIp> blackIpList = adwebBlackIpService.list(new QueryWrapper<AdwebPublicBlackIp>().eq("status", 1).eq("black_or_white", 0));
+        List<AdwebPublicBlackIp> blackIpList = adwebBlackIpService.list(new LambdaQueryWrapper<AdwebPublicBlackIp>().eq(AdwebPublicBlackIp::getStatus, 1).eq(AdwebPublicBlackIp::getBlackOrWhite, 0));
 
         if (CollectionUtils.isNotEmpty(blackIpList)) {
             List<String> collect = blackIpList.stream().map(AdwebPublicBlackIp::getIp).collect(Collectors.toList());
@@ -202,7 +202,7 @@ public class AdwebPublicBlackIpController extends JeecgController<AdwebPublicBla
             adwebRedisUtil.del(BlackIpKey);
         }
 
-        List<AdwebPublicBlackIp> whiteIpList = adwebBlackIpService.list(new QueryWrapper<AdwebPublicBlackIp>().eq("status", 1).eq("black_or_white", 1));
+        List<AdwebPublicBlackIp> whiteIpList = adwebBlackIpService.list(new LambdaQueryWrapper<AdwebPublicBlackIp>().eq(AdwebPublicBlackIp::getStatus, 1).eq(AdwebPublicBlackIp::getBlackOrWhite, 1));
 
         if (CollectionUtils.isNotEmpty(whiteIpList)) {
             List<String> collect = whiteIpList.stream().map(AdwebPublicBlackIp::getIp).collect(Collectors.toList());
@@ -230,7 +230,7 @@ public class AdwebPublicBlackIpController extends JeecgController<AdwebPublicBla
         }
         List<String> idList = Arrays.asList(ids.split(","));
 
-        List<AdwebPublicBlackIp> list = adwebBlackIpService.list(new QueryWrapper<AdwebPublicBlackIp>().eq("status", 1).in("id", idList));
+        List<AdwebPublicBlackIp> list = adwebBlackIpService.list(new LambdaQueryWrapper<AdwebPublicBlackIp>().eq(AdwebPublicBlackIp::getStatus, 1).in(AdwebPublicBlackIp::getId, idList));
 
         if (list.size() == 0) {
             return Result.error("该IP不存在");
@@ -244,7 +244,7 @@ public class AdwebPublicBlackIpController extends JeecgController<AdwebPublicBla
             adwebRedisUtil.del(NotBlackIpWasteEnquiryKey + adwebBlackIp.getIp());
         }
 
-        List<AdwebPublicBlackIp> blackIpList = adwebBlackIpService.list(new QueryWrapper<AdwebPublicBlackIp>().eq("status", 1).eq("black_or_white", 0));
+        List<AdwebPublicBlackIp> blackIpList = adwebBlackIpService.list(new LambdaQueryWrapper<AdwebPublicBlackIp>().eq(AdwebPublicBlackIp::getStatus, 1).eq(AdwebPublicBlackIp::getBlackOrWhite, 0));
 
         if (CollectionUtils.isNotEmpty(blackIpList)) {
             List<String> collect = blackIpList.stream().map(AdwebPublicBlackIp::getIp).collect(Collectors.toList());
@@ -253,7 +253,7 @@ public class AdwebPublicBlackIpController extends JeecgController<AdwebPublicBla
             adwebRedisUtil.del(BlackIpKey);
         }
 
-        List<AdwebPublicBlackIp> whiteIpList = adwebBlackIpService.list(new QueryWrapper<AdwebPublicBlackIp>().eq("status", 1).eq("black_or_white", 1));
+        List<AdwebPublicBlackIp> whiteIpList = adwebBlackIpService.list(new LambdaQueryWrapper<AdwebPublicBlackIp>().eq(AdwebPublicBlackIp::getStatus, 1).eq(AdwebPublicBlackIp::getBlackOrWhite, 1));
 
         if (CollectionUtils.isNotEmpty(whiteIpList)) {
             List<String> collect = whiteIpList.stream().map(AdwebPublicBlackIp::getIp).collect(Collectors.toList());
@@ -281,7 +281,7 @@ public class AdwebPublicBlackIpController extends JeecgController<AdwebPublicBla
             return Result.error("ID不能为空");
         }
 
-        List<AdwebPublicBlackIp> list = adwebBlackIpService.list(new QueryWrapper<AdwebPublicBlackIp>().eq("id", id).eq("status", 1));
+        List<AdwebPublicBlackIp> list = adwebBlackIpService.list(new LambdaQueryWrapper<AdwebPublicBlackIp>().eq(AdwebPublicBlackIp::getId, id).eq(AdwebPublicBlackIp::getStatus, 1));
 
         if (list.size() == 0) {
             return Result.error("该IP不存在");

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

@@ -4,7 +4,7 @@ import cn.hutool.core.io.IoUtil;
 import cn.hutool.poi.excel.ExcelReader;
 import cn.hutool.poi.excel.ExcelUtil;
 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.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -92,7 +92,7 @@ public class AdwebPublicEnquriyRuleController extends JeecgController<AdwebPubli
 
         adwebEnquiryRule.setWord(adwebEnquiryRule.getWord().replaceAll(" {2,}", " ").trim().toLowerCase());
 
-        int count = (int) adwebEnquiryRuleService.count(new QueryWrapper<AdwebPublicEnquiryRule>().eq("word", adwebEnquiryRule.getWord()).ne("status", 0).eq("use_status", adwebEnquiryRule.getUseStatus()));
+        int count = (int) adwebEnquiryRuleService.count(new LambdaQueryWrapper<AdwebPublicEnquiryRule>().eq(AdwebPublicEnquiryRule::getWord, adwebEnquiryRule.getWord()).ne(AdwebPublicEnquiryRule::getStatus, 0).eq(AdwebPublicEnquiryRule::getUseStatus, adwebEnquiryRule.getUseStatus()));
         if (count > 0) {
             return Result.error("规则关键词已存在");
         }
@@ -118,7 +118,7 @@ public class AdwebPublicEnquriyRuleController extends JeecgController<AdwebPubli
 
         adwebEnquiryRule.setWord(adwebEnquiryRule.getWord().replaceAll(" {2,}", " ").trim().toLowerCase());
 
-        int count = (int) adwebEnquiryRuleService.count(new QueryWrapper<AdwebPublicEnquiryRule>().eq("word", adwebEnquiryRule.getWord()).ne("status", 0).ne("id", adwebEnquiryRule.getId()).eq("use_status", adwebEnquiryRule.getUseStatus()));
+        int count = (int) adwebEnquiryRuleService.count(new LambdaQueryWrapper<AdwebPublicEnquiryRule>().eq(AdwebPublicEnquiryRule::getWord, adwebEnquiryRule.getWord()).ne(AdwebPublicEnquiryRule::getStatus, 0).ne(AdwebPublicEnquiryRule::getId, adwebEnquiryRule.getId()).eq(AdwebPublicEnquiryRule::getUseStatus, adwebEnquiryRule.getUseStatus()));
 
         if (count > 0) {
             return Result.error("规则关键词已存在");
@@ -274,7 +274,7 @@ public class AdwebPublicEnquriyRuleController extends JeecgController<AdwebPubli
             }
 
             List<String> wordList = rulesList.stream().map(AdwebPublicEnquiryRule::getWord).collect(Collectors.toList());
-            List<AdwebPublicEnquiryRule> adwebEnquiryRules = adwebEnquiryRuleService.list(new QueryWrapper<AdwebPublicEnquiryRule>().in("word", wordList).ne("status", 0).select("word").eq("use_status", 0));
+            List<AdwebPublicEnquiryRule> adwebEnquiryRules = adwebEnquiryRuleService.list(new LambdaQueryWrapper<AdwebPublicEnquiryRule>().in(AdwebPublicEnquiryRule::getWord, wordList).ne(AdwebPublicEnquiryRule::getStatus, 0).select(AdwebPublicEnquiryRule::getWord).eq(AdwebPublicEnquiryRule::getUseStatus, 0));
             List<String> adwebEnquiryRuleList = adwebEnquiryRules.stream().map(AdwebPublicEnquiryRule::getWord).collect(Collectors.toList());
 
             List<AdwebPublicEnquiryRule> collect = rulesList.stream().filter(adwebEnquiryRule -> !adwebEnquiryRuleList.contains(adwebEnquiryRule.getWord())).collect(Collectors.toList());

+ 3 - 3
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/AdwebOpenApiService.java

@@ -1,6 +1,6 @@
 package org.jeecg.modules.adweb.enquiry.service;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 
 import jakarta.annotation.Resource;
 
@@ -34,8 +34,8 @@ public class AdwebOpenApiService {
      * @return
      */
     public List<AdwebSite> selectBySiteCode(String siteCode) {
-        QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("code", siteCode);
+        LambdaQueryWrapper<AdwebSite> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(AdwebSite::getCode, siteCode);
         return adwebSiteService.list(queryWrapper);
     }
 

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

@@ -1,6 +1,6 @@
 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.extension.service.impl.ServiceImpl;
 import org.jeecg.modules.adweb.enquiry.entity.AdwebEnquiryForm;
 import org.jeecg.modules.adweb.enquiry.mapper.AdwebEnquiryFormMapper;
@@ -18,8 +18,8 @@ public class AdwebEnquiryFormServiceImpl extends ServiceImpl<AdwebEnquiryFormMap
 
     @Override
     public AdwebEnquiryForm getByEnquiryId(long enquiryId) {
-        QueryWrapper<AdwebEnquiryForm> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("enquiry_id", enquiryId);
+        LambdaQueryWrapper<AdwebEnquiryForm> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(AdwebEnquiryForm::getEnquiryId, enquiryId);
         return getOne(queryWrapper);
     }
 

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

@@ -554,6 +554,7 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
         List<String> idList = masterSubAccountRelationService.getSubAccountIdByMaster(adwebSite.getUid());
 
         //获取子账号信息
+        // TODO chenpeiqing: 字段在V3中不存在
         QueryWrapper<SysUser> sysUserQueryWrapper = new QueryWrapper<>();
         sysUserQueryWrapper.eq("is_inquiry", 2);
         sysUserQueryWrapper.eq("status", 1);

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

@@ -1,7 +1,7 @@
 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.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -36,11 +36,11 @@ public class AdwebPublicEnquiryRuleServiceImpl extends ServiceImpl<AdwebPublicEn
 
     @Override
     public List<String> getOpenAiBlackList() {
-        List<AdwebPublicEnquiryRule> list = this.list(new QueryWrapper<AdwebPublicEnquiryRule>()
-                .eq("status", 1)
-                .eq("use_status", 1)
-                .eq("is_enable", 1)
-                .eq("black_or_white_list", 0));
+        List<AdwebPublicEnquiryRule> list = this.list(new LambdaQueryWrapper<AdwebPublicEnquiryRule>()
+                .eq(AdwebPublicEnquiryRule::getStatus, 1)
+                .eq(AdwebPublicEnquiryRule::getUseStatus, 1)
+                .eq(AdwebPublicEnquiryRule::getIsEnable, 1)
+                .eq(AdwebPublicEnquiryRule::getBlackOrWhiteList, 0));
         if (CollectionUtils.isEmpty(list)) {
             return null;
         }
@@ -49,11 +49,11 @@ public class AdwebPublicEnquiryRuleServiceImpl extends ServiceImpl<AdwebPublicEn
 
     @Override
     public List<String> getEnquiryBlackList() {
-        List<AdwebPublicEnquiryRule> list = this.list(new QueryWrapper<AdwebPublicEnquiryRule>()
-                .eq("status", 1)
-                .eq("use_status", 0)
-                .eq("is_enable", 1)
-                .eq("black_or_white_list", 0));
+        List<AdwebPublicEnquiryRule> list = this.list(new LambdaQueryWrapper<AdwebPublicEnquiryRule>()
+                .eq(AdwebPublicEnquiryRule::getStatus, 1)
+                .eq(AdwebPublicEnquiryRule::getUseStatus, 0)
+                .eq(AdwebPublicEnquiryRule::getIsEnable, 1)
+                .eq(AdwebPublicEnquiryRule::getBlackOrWhiteList, 0));
         if (CollectionUtils.isEmpty(list)) {
             return null;
         }

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

@@ -1,7 +1,7 @@
 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.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -46,11 +46,11 @@ public class AdwebSiteBlackIpServiceImpl extends ServiceImpl<AdwebSiteBlackIpMap
     @Override
     public void addBlackIpByContent(EffectiveEnquiryParamDto effectiveEnquiryParamDto) {
         //排查添加的ip是否已有
-        QueryWrapper<AdwebSiteBlackIp> adwebSiteBlackIpQueryWrapper = new QueryWrapper<>();
-        adwebSiteBlackIpQueryWrapper.eq("ip", effectiveEnquiryParamDto.getWasteEnquirySeason());
-        adwebSiteBlackIpQueryWrapper.eq("site_id", effectiveEnquiryParamDto.getSiteId());
-        adwebSiteBlackIpQueryWrapper.eq("site_code", effectiveEnquiryParamDto.getSiteCode());
-        adwebSiteBlackIpQueryWrapper.eq("status", 1);
+        LambdaQueryWrapper<AdwebSiteBlackIp> adwebSiteBlackIpQueryWrapper = new LambdaQueryWrapper<>();
+        adwebSiteBlackIpQueryWrapper.eq(AdwebSiteBlackIp::getIp, effectiveEnquiryParamDto.getWasteEnquirySeason());
+        adwebSiteBlackIpQueryWrapper.eq(AdwebSiteBlackIp::getSiteId, effectiveEnquiryParamDto.getSiteId());
+        adwebSiteBlackIpQueryWrapper.eq(AdwebSiteBlackIp::getSiteCode, effectiveEnquiryParamDto.getSiteCode());
+        adwebSiteBlackIpQueryWrapper.eq(AdwebSiteBlackIp::getStatus, 1);
         List<AdwebSiteBlackIp> adwebSiteBlackIpList = list(adwebSiteBlackIpQueryWrapper);
         if (!adwebSiteBlackIpList.isEmpty()) {
             //如果有白名单 先删除原数据,后添加新的黑名单数据
@@ -80,10 +80,10 @@ public class AdwebSiteBlackIpServiceImpl extends ServiceImpl<AdwebSiteBlackIpMap
         }
 
         //重新调整对应站点redis缓存
-        QueryWrapper<AdwebSiteBlackIp> redisWrapper = new QueryWrapper<>();
-        redisWrapper.eq("site_id", effectiveEnquiryParamDto.getSiteId());
-        redisWrapper.eq("site_code", effectiveEnquiryParamDto.getSiteCode());
-        redisWrapper.eq("status", 1);
+        LambdaQueryWrapper<AdwebSiteBlackIp> redisWrapper = new LambdaQueryWrapper<>();
+        redisWrapper.eq(AdwebSiteBlackIp::getSiteId, effectiveEnquiryParamDto.getSiteId());
+        redisWrapper.eq(AdwebSiteBlackIp::getSiteCode, effectiveEnquiryParamDto.getSiteCode());
+        redisWrapper.eq(AdwebSiteBlackIp::getStatus, 1);
         List<AdwebSiteBlackIp> redisList = list(redisWrapper);
 
         if (!redisList.isEmpty()) {

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

@@ -1,6 +1,6 @@
 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.extension.service.impl.ServiceImpl;
 import org.jeecg.modules.adweb.enquiry.dto.param.EffectiveEnquiryParamDto;
 import org.jeecg.modules.adweb.enquiry.entity.AdwebSiteEnquiryRule;
@@ -28,11 +28,11 @@ public class AdwebSiteEnquiryRuleServiceImpl extends ServiceImpl<AdwebSiteEnquir
     @Override
     public void addBlackKeywordByContent(EffectiveEnquiryParamDto effectiveEnquiryParamDto) {
         //排查添加的关键词是否已有
-        QueryWrapper<AdwebSiteEnquiryRule> adwebEnquirySiteRuleQueryWrapper = new QueryWrapper<>();
-        adwebEnquirySiteRuleQueryWrapper.eq("word", effectiveEnquiryParamDto.getWasteEnquirySeason());
-        adwebEnquirySiteRuleQueryWrapper.eq("site_id", effectiveEnquiryParamDto.getSiteId());
-        adwebEnquirySiteRuleQueryWrapper.eq("site_code", effectiveEnquiryParamDto.getSiteCode());
-        adwebEnquirySiteRuleQueryWrapper.eq("status", 1);
+        LambdaQueryWrapper<AdwebSiteEnquiryRule> adwebEnquirySiteRuleQueryWrapper = new LambdaQueryWrapper<>();
+        adwebEnquirySiteRuleQueryWrapper.eq(AdwebSiteEnquiryRule::getWord, effectiveEnquiryParamDto.getWasteEnquirySeason());
+        adwebEnquirySiteRuleQueryWrapper.eq(AdwebSiteEnquiryRule::getSiteId, effectiveEnquiryParamDto.getSiteId());
+        adwebEnquirySiteRuleQueryWrapper.eq(AdwebSiteEnquiryRule::getSiteCode, effectiveEnquiryParamDto.getSiteCode());
+        adwebEnquirySiteRuleQueryWrapper.eq(AdwebSiteEnquiryRule::getStatus, 1);
         List<AdwebSiteEnquiryRule> adwebEnquirySiteRuleList = list(adwebEnquirySiteRuleQueryWrapper);
         if (!adwebEnquirySiteRuleList.isEmpty()) {
             //如果有白名单 先删除原数据,后添加新的黑名单数据

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

@@ -3,7 +3,7 @@ package org.jeecg.modules.adweb.enquiry.service.impl;
 import cn.hutool.core.collection.CollUtil;
 
 import com.alibaba.fastjson.JSONObject;
-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.extension.service.impl.ServiceImpl;
 import com.google.common.io.Resources;
@@ -93,9 +93,9 @@ public class EnquiryEmailMessageServiceImpl extends ServiceImpl<EnquiryEmailMess
             return;
         }
 
-        QueryWrapper<EnquiryEmailMessage> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("enquiry_id", enquiryId);
-        queryWrapper.eq("send_status", EnquirySendStatus.WAIT_SEND);
+        LambdaQueryWrapper<EnquiryEmailMessage> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(EnquiryEmailMessage::getEnquiryId, enquiryId);
+        queryWrapper.eq(EnquiryEmailMessage::getSendStatus, EnquirySendStatus.WAIT_SEND);
         List<EnquiryEmailMessage> messageList = list(queryWrapper);
         if (CollUtil.isNotEmpty(messageList)) {
             LambdaUpdateWrapper<EnquiryEmailMessage> updateWrapper = new LambdaUpdateWrapper<>();
@@ -115,7 +115,7 @@ public class EnquiryEmailMessageServiceImpl extends ServiceImpl<EnquiryEmailMess
     public void sendEmailByMessage(EnquiryEmailMessage message) {
         try {
             EmailSendMsgHandle sendMsgHandle = (EmailSendMsgHandle) Class.forName(SendMsgTypeEnum.EMAIL.getImplClass()).newInstance();
-            AdwebSite site = adwebSiteService.getOne(new QueryWrapper<AdwebSite>().eq("code", message.getSiteCode()));
+            AdwebSite site = adwebSiteService.getOne(new LambdaQueryWrapper<AdwebSite>().eq(AdwebSite::getCode, message.getSiteCode()));
             String fromName = Objects.toString(site.getCompanyName(), site.getName());
             sendMsgHandle.sendMsg(message.getEmail(), fromName, getEmailContent(message.getEnquiryId()));
             dealSendSuccess(message);
@@ -256,7 +256,7 @@ public class EnquiryEmailMessageServiceImpl extends ServiceImpl<EnquiryEmailMess
             //获取子账户邮箱
             List<String> subAccountIdList = masterSubAccountRelationService.getSubAccountIdByMaster(String.valueOf(adwebEnquiry.getUid()));
             if (!subAccountIdList.isEmpty()) {
-                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)) {
                     emailList = principalEmailList.stream().map(SysUser::getEmail).collect(Collectors.toList());
                 }
@@ -269,10 +269,10 @@ public class EnquiryEmailMessageServiceImpl extends ServiceImpl<EnquiryEmailMess
         }
 
         if (CollectionUtils.isNotEmpty(emailList)) {
-            QueryWrapper<EnquiryEmailMessage> enquiryEmailMessageQueryWrapper = new QueryWrapper<>();
-            enquiryEmailMessageQueryWrapper.eq("enquiry_id", adwebEnquiry.getId());
-            enquiryEmailMessageQueryWrapper.eq("site_code", adwebEnquiry.getSiteCode());
-            enquiryEmailMessageQueryWrapper.in("email", emailList);
+            LambdaQueryWrapper<EnquiryEmailMessage> enquiryEmailMessageQueryWrapper = new LambdaQueryWrapper<>();
+            enquiryEmailMessageQueryWrapper.eq(EnquiryEmailMessage::getEnquiryId, adwebEnquiry.getId());
+            enquiryEmailMessageQueryWrapper.eq(EnquiryEmailMessage::getSiteCode, adwebEnquiry.getSiteCode());
+            enquiryEmailMessageQueryWrapper.in(EnquiryEmailMessage::getEmail, emailList);
             List<EnquiryEmailMessage> enquiryEmailMessageList = list(enquiryEmailMessageQueryWrapper);
 
             if (CollectionUtils.isNotEmpty(enquiryEmailMessageList)) {

+ 10 - 9
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/site/controller/AdwebSiteController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.adweb.site.controller;
 
 import com.alibaba.fastjson.JSONObject;
+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.metadata.IPage;
@@ -97,7 +98,7 @@ public class AdwebSiteController extends JeecgController<AdwebSite, IAdwebSiteSe
         Page<AdwebSite> page = new Page<AdwebSite>(pageNo, pageSize);
 
         // 处理多租户过滤站点列表
-        processTenantFilter(queryWrapper);
+        processTenantFilter(queryWrapper.lambda());
 
         IPage<AdwebSite> pageList = adwebSiteService.page(page, queryWrapper);
 
@@ -177,8 +178,8 @@ public class AdwebSiteController extends JeecgController<AdwebSite, IAdwebSiteSe
         AdwebSite adwebSite = adwebSiteService.getById(id);
 
         // 删除站点权限
-        QueryWrapper<AdwebSitePermission> queryWrapper = new QueryWrapper<AdwebSitePermission>();
-        queryWrapper.eq("site_code", adwebSite.getCode());
+        LambdaQueryWrapper<AdwebSitePermission> queryWrapper = new LambdaQueryWrapper<AdwebSitePermission>();
+        queryWrapper.eq(AdwebSitePermission::getSiteCode, adwebSite.getCode());
         sitePermissionService.remove(queryWrapper);
 
         // 远程删除并备份站点资源
@@ -257,12 +258,12 @@ public class AdwebSiteController extends JeecgController<AdwebSite, IAdwebSiteSe
      */
     @GetMapping("/getSiteListByUid")
     public Result<?> getAllSites() {
-        QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
+        LambdaQueryWrapper<AdwebSite> queryWrapper = new LambdaQueryWrapper<>();
         // 处理多租户过滤站点列表
         processTenantFilter(queryWrapper);
 
-        queryWrapper.ne("status", AdwebConstant.SITE_DEL).isNull("parent_group_code");
-        queryWrapper.select("id", "name", "code", "domain", "domain_dev", "status");
+        queryWrapper.ne(AdwebSite::getStatus, AdwebConstant.SITE_DEL).isNull(AdwebSite::getParentGroupCode);
+        queryWrapper.select(AdwebSite::getId, AdwebSite::getName, AdwebSite::getCode, AdwebSite::getDomain, AdwebSite::getDomainDev, AdwebSite::getStatus);
         List<AdwebSite> siteList = adwebSiteService.list(queryWrapper);
 
         // 处理域名,全部改为绝对路径
@@ -303,7 +304,7 @@ public class AdwebSiteController extends JeecgController<AdwebSite, IAdwebSiteSe
         return Result.OK();
     }
 
-    private void processTenantFilter(QueryWrapper<AdwebSite> queryWrapper) {
+    private void processTenantFilter(LambdaQueryWrapper<AdwebSite> queryWrapper) {
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         // 对于非管理员进行租户隔离
         if (sysAdwebApi.isAdmin()) {
@@ -311,10 +312,10 @@ public class AdwebSiteController extends JeecgController<AdwebSite, IAdwebSiteSe
         } else if (sysAdwebApi.isChannelAdmin()) {
             List<String> channelGroupUids = sysAdwebApi.getChannelGroupUids();
             List<String> codeList = siteUserPermissionService.getSiteCodeListByUids(channelGroupUids);
-            queryWrapper.in("code", codeList);
+            queryWrapper.in(AdwebSite::getCode, codeList);
         } else {
             List<String> codeList = siteUserPermissionService.getSiteCodeList(sysUser.getId());
-            queryWrapper.in("code", codeList);
+            queryWrapper.in(AdwebSite::getCode, codeList);
         }
     }
 

+ 21 - 21
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/userCountry/controller/AdwebUserCountryController.java

@@ -104,9 +104,9 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
     @GetMapping(value = "/undistribute")
     public Result<?> undistribute() {
         LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        QueryWrapper<AdwebUserCountry> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("master_uid", loginUser.getId());
-        queryWrapper.eq("status", 1);
+        LambdaQueryWrapper<AdwebUserCountry> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(AdwebUserCountry::getMasterUid, loginUser.getId());
+        queryWrapper.eq(AdwebUserCountry::getStatus, 1);
         List<AdwebUserCountry> userCountries = adwebUserCountryService.list(queryWrapper);
         List<AdwebCountry> countries = null;
         if (CollectionUtils.isEmpty(userCountries)) {
@@ -127,10 +127,10 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
         List<Integer> siteIds = adwebSiteService.getAllSiteIdByParentId(siteId);
         Page<SubUser> page = new Page<>(pageNo, pageSize);
         IPage<SubUser> pageList = adwebUserCountryMapper.getSubUserList(page, loginUser.getId(), siteIds);
-        QueryWrapper<AdwebEnquiry> enquiryQueryWrapper = new QueryWrapper<>();
-        enquiryQueryWrapper.eq("status", 1);
-        enquiryQueryWrapper.in("site_id", siteIds);
-        enquiryQueryWrapper.eq("principal_type", 1);
+        LambdaQueryWrapper<AdwebEnquiry> enquiryQueryWrapper = new LambdaQueryWrapper<>();
+        enquiryQueryWrapper.eq(AdwebEnquiry::getStatus, 1);
+        enquiryQueryWrapper.in(AdwebEnquiry::getSiteId, siteIds);
+        enquiryQueryWrapper.eq(AdwebEnquiry::getPrincipalType, 1);
         int count = (int) adwebEnquiryService.count(enquiryQueryWrapper);
         List<SubUser> list = pageList.getRecords();
         SubUser subUser = new SubUser();
@@ -188,10 +188,10 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
      */
     @GetMapping(value = "/country/charge")
     public Result<?> chargeCountry(@RequestParam String id, @RequestParam Integer siteId) {
-        QueryWrapper<AdwebUserCountry> userCountryQueryWrapper = new QueryWrapper<>();
-        userCountryQueryWrapper.eq("uid", id);
-        userCountryQueryWrapper.eq("site_id", siteId);
-        userCountryQueryWrapper.eq("status", 1);
+        LambdaQueryWrapper<AdwebUserCountry> userCountryQueryWrapper = new LambdaQueryWrapper<>();
+        userCountryQueryWrapper.eq(AdwebUserCountry::getUid, id);
+        userCountryQueryWrapper.eq(AdwebUserCountry::getSiteId, siteId);
+        userCountryQueryWrapper.eq(AdwebUserCountry::getStatus, 1);
         List<AdwebUserCountry> userCountries = adwebUserCountryService.list(userCountryQueryWrapper);
         if (CollectionUtils.isEmpty(userCountries)) {
             return Result.OK();
@@ -202,8 +202,8 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
             countryIds.add(userCountry.getCountryId());
         }
 
-        QueryWrapper<AdwebCountry> countryQueryWrapper = new QueryWrapper<>();
-        countryQueryWrapper.in("geoname_id", countryIds);
+        LambdaQueryWrapper<AdwebCountry> countryQueryWrapper = new LambdaQueryWrapper<>();
+        countryQueryWrapper.in(AdwebCountry::getGeonameId, countryIds);
         List<AdwebCountry> countries = admpCountryService.list(countryQueryWrapper);
         if (CollectionUtils.isEmpty(countries)) {
             return Result.OK();
@@ -244,10 +244,10 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
     @GetMapping(value = "/country/uncontribute")
     public Result<?> uncontributeCountry(Integer siteId) {
         LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        QueryWrapper<AdwebUserCountry> userCountryQueryWrapper = new QueryWrapper<>();
-        userCountryQueryWrapper.eq("master_uid", loginUser.getId());
-        userCountryQueryWrapper.eq("status", 1);
-        userCountryQueryWrapper.eq("site_id", siteId);
+        LambdaQueryWrapper<AdwebUserCountry> userCountryQueryWrapper = new LambdaQueryWrapper<>();
+        userCountryQueryWrapper.eq(AdwebUserCountry::getMasterUid, loginUser.getId());
+        userCountryQueryWrapper.eq(AdwebUserCountry::getStatus, 1);
+        userCountryQueryWrapper.eq(AdwebUserCountry::getSiteId, siteId);
         List<AdwebUserCountry> userCountries = adwebUserCountryService.list(userCountryQueryWrapper);
 
         List<AdwebCountry> countries;
@@ -259,8 +259,8 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
                 countryIds.add(userCountry.getCountryId());
             }
 
-            QueryWrapper<AdwebCountry> countryQueryWrapper = new QueryWrapper<>();
-            countryQueryWrapper.notIn("geoname_id", countryIds);
+            LambdaQueryWrapper<AdwebCountry> countryQueryWrapper = new LambdaQueryWrapper<>();
+            countryQueryWrapper.notIn(AdwebCountry::getGeonameId, countryIds);
             countries = admpCountryService.list(countryQueryWrapper);
         }
         if (CollectionUtils.isEmpty(countries)) {
@@ -326,8 +326,8 @@ public class AdwebUserCountryController extends JeecgController<AdwebUserCountry
         adwebUserCountryService.saveBatch(userCountries);
 
         // 更改相关询盘的负责人
-        QueryWrapper<AdwebCountry> countryQueryWrapper = new QueryWrapper<>();
-        countryQueryWrapper.in("geoname_id", countryIdArr);
+        LambdaQueryWrapper<AdwebCountry> countryQueryWrapper = new LambdaQueryWrapper<>();
+        countryQueryWrapper.in(AdwebCountry::getGeonameId, countryIdArr);
         List<AdwebCountry> countries = admpCountryService.list(countryQueryWrapper);
         List<String> countryCodes = countries.stream().map(AdwebCountry::getCountryIsoCode).collect(Collectors.toList());
 

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

@@ -1,6 +1,6 @@
 package org.jeecg.modules.adweb.userCountry.service.impl;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import jakarta.annotation.Resource;
 import org.apache.commons.collections4.CollectionUtils;
@@ -35,10 +35,10 @@ public class AdwebUserCountryServiceImpl extends ServiceImpl<AdwebUserCountryMap
      */
     @Override
     public List<Integer> getCountryIdsBySubId(String id) {
-        QueryWrapper<AdwebUserCountry> queryWrapper = new QueryWrapper<AdwebUserCountry>()
-                .select("country_id")
-                .eq("uid", id)
-                .eq("status", 1);
+        LambdaQueryWrapper<AdwebUserCountry> queryWrapper = new LambdaQueryWrapper<AdwebUserCountry>()
+                .select(AdwebUserCountry::getCountryId)
+                .eq(AdwebUserCountry::getUid, id)
+                .eq(AdwebUserCountry::getStatus, 1);
         List<AdwebUserCountry> list = this.list(queryWrapper);
         if (CollectionUtils.isEmpty(list)) {
             return new ArrayList<>();
@@ -59,8 +59,8 @@ public class AdwebUserCountryServiceImpl extends ServiceImpl<AdwebUserCountryMap
         if (CollectionUtils.isEmpty(countryIds)) {
             return new ArrayList<>();
         }
-        QueryWrapper<AdwebCountry> queryWrapper = new QueryWrapper<>();
-        queryWrapper.in("geoname_id", countryIds);
+        LambdaQueryWrapper<AdwebCountry> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.in(AdwebCountry::getGeonameId, countryIds);
         List<AdwebCountry> countries = adwebCountryService.list(queryWrapper);
         return countries.stream().map(AdwebCountry::getCountryIsoCode).collect(Collectors.toList());
     }