Browse Source

Merge branch 'dev-zenas-20241018' of wangfan/adweb3-server into master

zhangqiang 5 months ago
parent
commit
e00c484bf1

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

@@ -23,7 +23,6 @@ import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.api.ISysBaseAPI;
 import org.jeecg.common.system.base.controller.JeecgController;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.config.security.utils.SecureUtil;
 import org.jeecg.modules.adweb.seo.dto.AvesApiSearchKeywordsDTO;
@@ -79,8 +78,18 @@ public class SeoKeywordsController extends JeecgController<SeoKeywords, ISeoKeyw
         if ((seoKeywords.getSiteCode() == null || seoKeywords.getSiteCode().isEmpty())) {
             return Result.error("请选择站点");
         }
-        QueryWrapper<SeoKeywords> queryWrapper =
-                QueryGenerator.initQueryWrapper(seoKeywords, req.getParameterMap());
+        QueryWrapper<SeoKeywords> queryWrapper = new QueryWrapper<>();
+        if (StringUtil.isNotEmpty(seoKeywords.getKeywords())) {
+            queryWrapper.like("keywords", "%" + seoKeywords.getKeywords() + "%");
+        }
+//        queryWrapper.eq("related_keyword_id", seoKeywords.getRelatedKeywordId());
+//        queryWrapper.eq("subscription_id", seoKeywords.getSubscriptionId());
+        queryWrapper.eq("site_code", seoKeywords.getSiteCode());
+        if (seoKeywords.getKeywordType() != null) {
+            queryWrapper.eq("keyword_type", seoKeywords.getKeywordType());
+        }
+        queryWrapper.ne("status", 0);
+        queryWrapper.orderByAsc("priority").orderByDesc("optimize_process").orderByDesc("create_time");
         Page<SeoKeywords> page = new Page<SeoKeywords>(pageNo, pageSize);
         IPage<SeoKeywords> pageList = seoKeywordsService.page(page, queryWrapper);
         return Result.OK(pageList);