wfansh 2 maanden geleden
bovenliggende
commit
edb638b016

+ 29 - 29
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/controller/AdwebSiteBlackEmailController.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;
@@ -111,10 +111,10 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
         if (enquirySiteBlackEmail.getSiteId() != null) {
             String siteCode = adwebSiteService.getSiteCodeById(enquirySiteBlackEmail.getSiteId());
             if (StringUtils.isNotBlank(siteCode)) {
-                QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
-                queryWrapper.eq("id", enquirySiteBlackEmail.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, enquirySiteBlackEmail.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());
             }
         } else {
@@ -156,18 +156,18 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
         //将邮箱转换为小写
         enquirySiteBlackEmail.setEmail(enquirySiteBlackEmail.getEmail().trim().toLowerCase());
 
-        int count = (int) enquirySiteBlackEmailService.count(new QueryWrapper<AdwebSiteBlackEmail>().ne("status", 0).eq("email", enquirySiteBlackEmail.getEmail())
-                .eq("site_id", enquirySiteBlackEmail.getSiteId()).eq("type", enquirySiteBlackEmail.getType()));
+        int count = (int) enquirySiteBlackEmailService.count(new LambdaQueryWrapper<AdwebSiteBlackEmail>().ne(AdwebSiteBlackEmail::getStatus, 0).eq(AdwebSiteBlackEmail::getEmail, enquirySiteBlackEmail.getEmail())
+                .eq(AdwebSiteBlackEmail::getSiteId, enquirySiteBlackEmail.getSiteId()).eq(AdwebSiteBlackEmail::getType, enquirySiteBlackEmail.getType()));
 
         if (count > 0) {
             return Result.error("邮箱已存在");
         }
 
         //判断站点询盘黑名单是否存在添加进来的黑名单
-        QueryWrapper<AdwebEnquiryBlacklist> adwebEnquiryBlacklistQueryWrapper = new QueryWrapper<>();
-        adwebEnquiryBlacklistQueryWrapper.eq("site_id", enquirySiteBlackEmail.getSiteId());
-        adwebEnquiryBlacklistQueryWrapper.eq("status", 1);
-        adwebEnquiryBlacklistQueryWrapper.eq("email", enquirySiteBlackEmail.getEmail());
+        LambdaQueryWrapper<AdwebEnquiryBlacklist> adwebEnquiryBlacklistQueryWrapper = new LambdaQueryWrapper<>();
+        adwebEnquiryBlacklistQueryWrapper.eq(AdwebEnquiryBlacklist::getSiteId, enquirySiteBlackEmail.getSiteId());
+        adwebEnquiryBlacklistQueryWrapper.eq(AdwebEnquiryBlacklist::getStatus, 1);
+        adwebEnquiryBlacklistQueryWrapper.eq(AdwebEnquiryBlacklist::getEmail, enquirySiteBlackEmail.getEmail());
         List<AdwebEnquiryBlacklist> enquiryBlacklists = adwebEnquiryBlacklistService.list(adwebEnquiryBlacklistQueryWrapper);
 
         if (CollectionUtils.isNotEmpty(enquiryBlacklists)) {
@@ -217,17 +217,17 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
         //将邮箱转换为小写
         enquirySiteBlackEmail.setEmail(enquirySiteBlackEmail.getEmail().trim().toLowerCase());
 
-        int count = (int) enquirySiteBlackEmailService.count(new QueryWrapper<AdwebSiteBlackEmail>().ne("status", 0).eq("email", enquirySiteBlackEmail.getEmail()).eq("site_id", enquirySiteBlackEmail.getSiteId()).eq("black_or_white", enquirySiteBlackEmail.getBlackOrWhite()).ne("id", enquirySiteBlackEmail.getId()));
+        int count = (int) enquirySiteBlackEmailService.count(new LambdaQueryWrapper<AdwebSiteBlackEmail>().ne(AdwebSiteBlackEmail::getStatus, 0).eq(AdwebSiteBlackEmail::getEmail, enquirySiteBlackEmail.getEmail()).eq(AdwebSiteBlackEmail::getSiteId, enquirySiteBlackEmail.getSiteId()).eq(AdwebSiteBlackEmail::getBlackOrWhite, enquirySiteBlackEmail.getBlackOrWhite()).ne(AdwebSiteBlackEmail::getId, enquirySiteBlackEmail.getId()));
 
         if (count > 0) {
             return Result.error("邮箱已存在");
         }
 
         //判断站点询盘黑名单是否存在添加进来的黑名单
-        QueryWrapper<AdwebEnquiryBlacklist> adwebEnquiryBlacklistQueryWrapper = new QueryWrapper<>();
-        adwebEnquiryBlacklistQueryWrapper.eq("site_id", enquirySiteBlackEmail.getSiteId());
-        adwebEnquiryBlacklistQueryWrapper.eq("status", 1);
-        adwebEnquiryBlacklistQueryWrapper.eq("email", enquirySiteBlackEmail.getEmail());
+        LambdaQueryWrapper<AdwebEnquiryBlacklist> adwebEnquiryBlacklistQueryWrapper = new LambdaQueryWrapper<>();
+        adwebEnquiryBlacklistQueryWrapper.eq(AdwebEnquiryBlacklist::getSiteId, enquirySiteBlackEmail.getSiteId());
+        adwebEnquiryBlacklistQueryWrapper.eq(AdwebEnquiryBlacklist::getStatus, 1);
+        adwebEnquiryBlacklistQueryWrapper.eq(AdwebEnquiryBlacklist::getEmail, enquirySiteBlackEmail.getEmail());
         List<AdwebEnquiryBlacklist> enquiryBlacklists = adwebEnquiryBlacklistService.list(adwebEnquiryBlacklistQueryWrapper);
 
         if (CollectionUtils.isNotEmpty(enquiryBlacklists)) {
@@ -238,7 +238,7 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
 
         //判断公共询盘缓存的是否包含历史的黑名单数据
         if (!oldAdwebSiteBlackEmail.getEmail().equals(enquirySiteBlackEmail.getEmail())) {
-            List<AdwebPublicBlackEmail> emailList = enquiryPublicBlackEmailService.list(new QueryWrapper<AdwebPublicBlackEmail>().eq("status", 1).eq("black_or_white", 0));
+            List<AdwebPublicBlackEmail> emailList = enquiryPublicBlackEmailService.list(new LambdaQueryWrapper<AdwebPublicBlackEmail>().eq(AdwebPublicBlackEmail::getStatus, 1).eq(AdwebPublicBlackEmail::getBlackOrWhite, 0));
             List<String> pubicBlackEmailList = emailList.stream().map(AdwebPublicBlackEmail::getEmail).collect(Collectors.toList());
 
             List<String> publicBlackList = (List<String>) adwebRedisUtil.get(BlackEmailKey);
@@ -263,9 +263,9 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
         enquirySiteBlackEmail.setUpdateTime(new Date());
         enquirySiteBlackEmailService.updateById(enquirySiteBlackEmail);
 
-        QueryWrapper<AdwebSiteBlackEmail> siteAllEmailQueryWrapper = new QueryWrapper<>();
-        siteAllEmailQueryWrapper.ne("status", 0);
-        siteAllEmailQueryWrapper.eq("site_id", enquirySiteBlackEmail.getSiteId());
+        LambdaQueryWrapper<AdwebSiteBlackEmail> siteAllEmailQueryWrapper = new LambdaQueryWrapper<>();
+        siteAllEmailQueryWrapper.ne(AdwebSiteBlackEmail::getStatus, 0);
+        siteAllEmailQueryWrapper.eq(AdwebSiteBlackEmail::getSiteId, enquirySiteBlackEmail.getSiteId());
         List<AdwebSiteBlackEmail> allEmailList = enquirySiteBlackEmailService.list(siteAllEmailQueryWrapper);
         if (CollectionUtils.isEmpty(allEmailList)) {
             log.info("未获取到对应站点的黑白名单数据");
@@ -334,7 +334,7 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
         }
 
         //判断公共询盘缓存的是否包含历史的黑名单数据
-        List<AdwebPublicBlackEmail> pubicEmailList = enquiryPublicBlackEmailService.list(new QueryWrapper<AdwebPublicBlackEmail>().eq("status", 1).eq("black_or_white", 0));
+        List<AdwebPublicBlackEmail> pubicEmailList = enquiryPublicBlackEmailService.list(new LambdaQueryWrapper<AdwebPublicBlackEmail>().eq(AdwebPublicBlackEmail::getStatus, 1).eq(AdwebPublicBlackEmail::getBlackOrWhite, 0));
         List<String> pubicBlackEmailList = pubicEmailList.stream().map(AdwebPublicBlackEmail::getEmail).collect(Collectors.toList());
 
         List<String> publicBlackList = (List<String>) adwebRedisUtil.get(BlackEmailKey);
@@ -366,9 +366,9 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
         adwebRedisUtil.del(SiteEmailOneDayKey + enquirySiteBlackEmail.getSiteId() + "::" + enquirySiteBlackEmail.getEmail());
         adwebRedisUtil.del(NotBlackEmailWasteSiteEnquiryKey + enquirySiteBlackEmail.getSiteId() + "::" + enquirySiteBlackEmail.getEmail());
 
-        QueryWrapper<AdwebSiteBlackEmail> siteAllEmailQueryWrapper = new QueryWrapper<>();
-        siteAllEmailQueryWrapper.ne("status", 0);
-        siteAllEmailQueryWrapper.eq("site_id", enquirySiteBlackEmail.getSiteId());
+        LambdaQueryWrapper<AdwebSiteBlackEmail> siteAllEmailQueryWrapper = new LambdaQueryWrapper<>();
+        siteAllEmailQueryWrapper.ne(AdwebSiteBlackEmail::getStatus, 0);
+        siteAllEmailQueryWrapper.eq(AdwebSiteBlackEmail::getSiteId, enquirySiteBlackEmail.getSiteId());
         List<AdwebSiteBlackEmail> allEmailList = enquirySiteBlackEmailService.list(siteAllEmailQueryWrapper);
         if (CollectionUtils.isEmpty(allEmailList)) {
             log.info("未获取到对应站点的黑白名单数据");
@@ -428,7 +428,7 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
 
         List<String> idList = Arrays.asList(ids.split(","));
 
-        List<AdwebSiteBlackEmail> list = enquirySiteBlackEmailService.list(new QueryWrapper<AdwebSiteBlackEmail>().in("id", idList).ne("status", 0));
+        List<AdwebSiteBlackEmail> list = enquirySiteBlackEmailService.list(new LambdaQueryWrapper<AdwebSiteBlackEmail>().in(AdwebSiteBlackEmail::getSiteId, idList).ne(AdwebSiteBlackEmail::getStatus, 0));
 
         if (list.isEmpty()) {
             return Result.error("未找到对应数据");
@@ -441,7 +441,7 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
         for (AdwebSiteBlackEmail enquirySiteBlackEmail : list) {
 
             //判断公共询盘缓存的是否包含历史的黑名单数据
-            List<AdwebPublicBlackEmail> pubicEmailList = enquiryPublicBlackEmailService.list(new QueryWrapper<AdwebPublicBlackEmail>().eq("status", 1).eq("black_or_white", 0));
+            List<AdwebPublicBlackEmail> pubicEmailList = enquiryPublicBlackEmailService.list(new LambdaQueryWrapper<AdwebPublicBlackEmail>().eq(AdwebPublicBlackEmail::getStatus, 1).eq(AdwebPublicBlackEmail::getBlackOrWhite, 0));
             List<String> pubicBlackEmailList = pubicEmailList.stream().map(AdwebPublicBlackEmail::getEmail).collect(Collectors.toList());
 
             List<String> publicBlackList = (List<String>) adwebRedisUtil.get(BlackEmailKey);
@@ -474,9 +474,9 @@ public class AdwebSiteBlackEmailController extends JeecgController<AdwebSiteBlac
 
 
         for (Integer siteId : siteList) {
-            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 = enquirySiteBlackEmailService.list(siteAllEmailQueryWrapper);
             if (CollectionUtils.isEmpty(allEmailList)) {
                 log.info("未获取到对应站点的黑白名单数据");

+ 15 - 15
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/controller/AdwebSiteBlackIpController.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;
@@ -98,10 +98,10 @@ public class AdwebSiteBlackIpController extends JeecgController<AdwebSiteBlackIp
         if (adwebSiteBlackIp.getSiteId() != null) {
             String siteCode = adwebSiteService.getSiteCodeById(adwebSiteBlackIp.getSiteId());
             if (StringUtils.isNotBlank(siteCode)) {
-                QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
-                queryWrapper.eq("id", adwebSiteBlackIp.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, adwebSiteBlackIp.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());
             }
         } else {
@@ -128,8 +128,8 @@ public class AdwebSiteBlackIpController extends JeecgController<AdwebSiteBlackIp
     public Result<?> add(@RequestBody AdwebSiteBlackIp adwebSiteBlackIp) {
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
 
-        int count = (int) adwebSiteBlackIpService.count(new QueryWrapper<AdwebSiteBlackIp>().ne("status", 0).eq("ip", adwebSiteBlackIp.getIp())
-                .eq("site_id", adwebSiteBlackIp.getSiteId()));
+        int count = (int) adwebSiteBlackIpService.count(new LambdaQueryWrapper<AdwebSiteBlackIp>().ne(AdwebSiteBlackIp::getStatus, 0).eq(AdwebSiteBlackIp::getIp, adwebSiteBlackIp.getIp())
+                .eq(AdwebSiteBlackIp::getSiteId, adwebSiteBlackIp.getSiteId()));
 
         if (count > 0) {
             return Result.error("当前站点已存在此ip");
@@ -138,7 +138,7 @@ public class AdwebSiteBlackIpController extends JeecgController<AdwebSiteBlackIp
         adwebSiteBlackIp.setCreateTime(new Date());
         adwebSiteBlackIpService.save(adwebSiteBlackIp);
 
-        List<AdwebSiteBlackIp> siteBlackIpList = adwebSiteBlackIpService.list(new QueryWrapper<AdwebSiteBlackIp>().eq("status", 1).eq("site_id", adwebSiteBlackIp.getSiteId()));
+        List<AdwebSiteBlackIp> siteBlackIpList = adwebSiteBlackIpService.list(new LambdaQueryWrapper<AdwebSiteBlackIp>().eq(AdwebSiteBlackIp::getStatus, 1).eq(AdwebSiteBlackIp::getSiteId, adwebSiteBlackIp.getSiteId()));
 
         if (CollectionUtils.isEmpty(siteBlackIpList)) {
             adwebRedisUtil.del(SiteBlackIpKey + "::" + adwebSiteBlackIp.getSiteId());
@@ -174,8 +174,8 @@ public class AdwebSiteBlackIpController extends JeecgController<AdwebSiteBlackIp
     public Result<?> edit(@RequestBody AdwebSiteBlackIp adwebSiteBlackIp) {
         LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
 
-        int count = (int) adwebSiteBlackIpService.count(new QueryWrapper<AdwebSiteBlackIp>().ne("status", 0).eq("ip", adwebSiteBlackIp.getIp())
-                .eq("site_id", adwebSiteBlackIp.getSiteId()).ne("id", adwebSiteBlackIp.getId()));
+        int count = (int) adwebSiteBlackIpService.count(new LambdaQueryWrapper<AdwebSiteBlackIp>().ne(AdwebSiteBlackIp::getStatus, 0).eq(AdwebSiteBlackIp::getIp, adwebSiteBlackIp.getIp())
+                .eq(AdwebSiteBlackIp::getSiteId, adwebSiteBlackIp.getSiteId()).ne(AdwebSiteBlackIp::getId, adwebSiteBlackIp.getId()));
 
         if (count > 0) {
             return Result.error("当前站点已存在此ip");
@@ -187,7 +187,7 @@ public class AdwebSiteBlackIpController extends JeecgController<AdwebSiteBlackIp
         }
         adwebSiteBlackIpService.updateById(adwebSiteBlackIp);
 
-        List<AdwebSiteBlackIp> siteBlackIpList = adwebSiteBlackIpService.list(new QueryWrapper<AdwebSiteBlackIp>().eq("status", 1).eq("site_id", adwebSiteBlackIp.getSiteId()));
+        List<AdwebSiteBlackIp> siteBlackIpList = adwebSiteBlackIpService.list(new LambdaQueryWrapper<AdwebSiteBlackIp>().eq(AdwebSiteBlackIp::getStatus, 1).eq(AdwebSiteBlackIp::getSiteId, adwebSiteBlackIp.getSiteId()));
 
         if (CollectionUtils.isEmpty(siteBlackIpList)) {
             adwebRedisUtil.del(SiteBlackIpKey + "::" + adwebSiteBlackIp.getSiteId());
@@ -227,7 +227,7 @@ public class AdwebSiteBlackIpController extends JeecgController<AdwebSiteBlackIp
             return Result.error("id不能为空");
         }
 
-        List<AdwebSiteBlackIp> list = adwebSiteBlackIpService.list(new QueryWrapper<AdwebSiteBlackIp>().eq("id", id).eq("status", 1));
+        List<AdwebSiteBlackIp> list = adwebSiteBlackIpService.list(new LambdaQueryWrapper<AdwebSiteBlackIp>().eq(AdwebSiteBlackIp::getId, id).eq(AdwebSiteBlackIp::getStatus, 1));
 
         if (list.size() == 0) {
             return Result.error("该IP不存在");
@@ -241,7 +241,7 @@ public class AdwebSiteBlackIpController extends JeecgController<AdwebSiteBlackIp
         adwebRedisUtil.del(SiteIpOneDayKey + adwebSiteBlackIp.getSiteId() + "::" + adwebSiteBlackIp.getIp());
         adwebRedisUtil.del(NotSiteBlackIpWasteEnquiryKey + adwebSiteBlackIp.getSiteId() + "::" + adwebSiteBlackIp.getIp());
 
-        List<AdwebSiteBlackIp> siteBlackIpList = adwebSiteBlackIpService.list(new QueryWrapper<AdwebSiteBlackIp>().eq("status", 1).eq("site_id", adwebSiteBlackIp.getSiteId()));
+        List<AdwebSiteBlackIp> siteBlackIpList = adwebSiteBlackIpService.list(new LambdaQueryWrapper<AdwebSiteBlackIp>().eq(AdwebSiteBlackIp::getStatus, 1).eq(AdwebSiteBlackIp::getSiteId, adwebSiteBlackIp.getSiteId()));
 
         if (CollectionUtils.isEmpty(siteBlackIpList)) {
             adwebRedisUtil.del(SiteBlackIpKey + "::" + adwebSiteBlackIp.getSiteId());
@@ -283,7 +283,7 @@ public class AdwebSiteBlackIpController extends JeecgController<AdwebSiteBlackIp
         }
         List<String> idList = Arrays.asList(ids.split(","));
 
-        List<AdwebSiteBlackIp> list = adwebSiteBlackIpService.list(new QueryWrapper<AdwebSiteBlackIp>().eq("status", 1).in("id", idList));
+        List<AdwebSiteBlackIp> list = adwebSiteBlackIpService.list(new LambdaQueryWrapper<AdwebSiteBlackIp>().eq(AdwebSiteBlackIp::getStatus, 1).in(AdwebSiteBlackIp::getId, idList));
 
         if (list.size() == 0) {
             return Result.error("该IP不存在");
@@ -303,7 +303,7 @@ public class AdwebSiteBlackIpController extends JeecgController<AdwebSiteBlackIp
         }
 
         for (Integer siteId : siteIdHashSet) {
-            List<AdwebSiteBlackIp> siteBlackIpList = adwebSiteBlackIpService.list(new QueryWrapper<AdwebSiteBlackIp>().eq("status", 1).eq("site_id", siteId));
+            List<AdwebSiteBlackIp> siteBlackIpList = adwebSiteBlackIpService.list(new LambdaQueryWrapper<AdwebSiteBlackIp>().eq(AdwebSiteBlackIp::getStatus, 1).eq(AdwebSiteBlackIp::getSiteId, siteId));
 
             if (CollectionUtils.isEmpty(siteBlackIpList)) {
                 adwebRedisUtil.del(SiteBlackIpKey + "::" + siteId);

+ 5 - 5
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/controller/AdwebSiteEnquiryRuleController.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.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.swagger.v3.oas.annotations.Operation;
@@ -88,10 +88,10 @@ public class AdwebSiteEnquiryRuleController extends JeecgController<AdwebSiteEnq
         if (adwebEnquirySiteRule.getSiteId() != null) {
             String siteCode = adwebSiteService.getSiteCodeById(adwebEnquirySiteRule.getSiteId());
             if (StringUtils.isNotBlank(siteCode)) {
-                QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
-                queryWrapper.eq("id", adwebEnquirySiteRule.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, adwebEnquirySiteRule.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());
             }
         } else {

+ 4 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/product/service/impl/AdwebProductServiceImpl.java

@@ -5,7 +5,7 @@ import cn.hutool.core.codec.Base64Encoder;
 import cn.hutool.http.HttpRequest;
 import cn.hutool.http.HttpResponse;
 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 lombok.extern.slf4j.Slf4j;
@@ -56,9 +56,9 @@ public class AdwebProductServiceImpl extends ServiceImpl<AdwebProductMapper, Adw
     }
 
     private void handleUpdate(ProductDTO productDTO, AdwebSite adwebSites) {
-        QueryWrapper<AdwebProduct> productQuery = new QueryWrapper<>();
-        productQuery.eq("product_id", productDTO.getProductId());
-        productQuery.eq("site_code", adwebSites.getCode());
+        LambdaQueryWrapper<AdwebProduct> productQuery = new LambdaQueryWrapper<>();
+        productQuery.eq(AdwebProduct::getProductId, productDTO.getProductId());
+        productQuery.eq(AdwebProduct::getSiteCode, adwebSites.getCode());
 
         AdwebProduct product = this.getOne(productQuery);
         // 执行更新操作

+ 3 - 3
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/seo/controller/SeoMonthPdfController.java

@@ -1,6 +1,6 @@
 package org.jeecg.modules.adweb.seo.controller;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 
 import lombok.extern.slf4j.Slf4j;
 
@@ -70,8 +70,8 @@ public class SeoMonthPdfController {
     public Result<?> editSeoMonthPlan(@RequestBody SysDictItem sysDictItem) {
         LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         sysDictItem.setUpdateBy(user.getUsername());
-        QueryWrapper<SysDictItem> currentQueryWrapper = new QueryWrapper();
-        currentQueryWrapper.eq("item_text", sysDictItem.getItemText());
+        LambdaQueryWrapper<SysDictItem> currentQueryWrapper = new LambdaQueryWrapper();
+        currentQueryWrapper.eq(SysDictItem::getItemText, sysDictItem.getItemText());
         SysDictItem sysDictItem1 = sysDictItemService.getOne(currentQueryWrapper);
         sysDictItem.setId(sysDictItem1.getId());
         boolean update = sysDictItemService.updateById(sysDictItem);

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

@@ -1,6 +1,6 @@
 package org.jeecg.modules.adweb.site.service;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import jakarta.annotation.Resource;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections4.CollectionUtils;
@@ -159,9 +159,9 @@ public class SelfWebSiteServiceCommon {
         log.info("================新站点授权===============");
 
         String siteName = "";
-        QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("code", siteCode);
-        queryWrapper.ne("status", AdwebConstant.SITE_DEL);
+        LambdaQueryWrapper<AdwebSite> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(AdwebSite::getCode, siteCode);
+        queryWrapper.ne(AdwebSite::getStatus, AdwebConstant.SITE_DEL);
         List<AdwebSite> list = adwebSiteService.list(queryWrapper);
         if (CollectionUtils.isNotEmpty(list)) {
             siteName = list.get(0).getName();

+ 3 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/site/service/SiteManageService.java

@@ -2,7 +2,6 @@ package org.jeecg.modules.adweb.site.service;
 
 import cn.hutool.core.util.RandomUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import jakarta.annotation.Resource;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
@@ -211,9 +210,9 @@ public class SiteManageService {
      * @return
      */
     public List<AdwebSite> checkSiteDomainIsExists(String domain) {
-        QueryWrapper<AdwebSite> queryWrapper = new QueryWrapper<>();
-        queryWrapper.like("domain", domain);
-        queryWrapper.ne("status", 0);
+        LambdaQueryWrapper<AdwebSite> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.like(AdwebSite::getDomain, domain);
+        queryWrapper.ne(AdwebSite::getStatus, 0);
         return adwebSiteMapper.selectList(queryWrapper);
     }
 }

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

@@ -1,7 +1,7 @@
 package org.jeecg.modules.adweb.site.service;
 
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import jakarta.annotation.Resource;
 import org.jeecg.modules.adweb.site.entity.Sohoeb2bOrder;
 import org.jeecg.modules.adweb.site.mapper.Sohoeb2bOrderMapper;
@@ -31,9 +31,9 @@ public class Sohoeb2bOrderService {
     }
 
     public Sohoeb2bOrder getBySiteCode(String siteCode) {
-        QueryWrapper<Sohoeb2bOrder> query = new QueryWrapper<>();
+        LambdaQueryWrapper<Sohoeb2bOrder> query = new LambdaQueryWrapper<>();
 
-        query.eq("site_code", siteCode);
+        query.eq(Sohoeb2bOrder::getSiteCode, siteCode);
 
         return sohoeb2bOrderMapper.selectOne(query);
     }

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

@@ -1,6 +1,6 @@
 package org.jeecg.modules.adweb.system.controller;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import jakarta.annotation.PostConstruct;
 import jakarta.annotation.Resource;
@@ -69,19 +69,19 @@ public class SystemAdwebController {
         // 只针对admin 获取 渠道商列表
         if (sysAdwebApi.isAdmin()) {
             //获取role表里角色编码为adweb_oem的角色的id
-            List<SysRole> sysRoleList = iSysRoleService.list(new QueryWrapper<SysRole>().eq("role_code", "adweb_oem"));
+            List<SysRole> sysRoleList = iSysRoleService.list(new LambdaQueryWrapper<SysRole>().eq(SysRole::getRoleCode, "adweb_oem"));
             if (sysRoleList.isEmpty()) {
                 return Result.error("获取渠道商列表失败");
             }
             SysRole role = sysRoleList.get(0);
             //根据adweb_oem的角色的id去查user_role中间表中所有为此角色id的user_id
-            List<SysUserRole> sysUserRoleList = iSysUserRoleService.list(new QueryWrapper<SysUserRole>().eq("role_id", role.getId()));
+            List<SysUserRole> sysUserRoleList = iSysUserRoleService.list(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getRoleId, role.getId()));
             if (sysUserRoleList.isEmpty()) {
                 return Result.error("获取渠道商列表失败");
             }
             List<String> userIdList = sysUserRoleList.stream().map(SysUserRole::getUserId).collect(Collectors.toList());
             //查询user表中所有上面查询出的user_id的数据
-            userList = iSysUserService.list(new QueryWrapper<SysUser>().in("id", userIdList));
+            userList = iSysUserService.list(new LambdaQueryWrapper<SysUser>().in(SysUser::getId, userIdList));
         }
         return Result.OK(userList);
     }