Browse Source

Merge branch 'seo' of wangfan/adweb3-server into master

wangfan 1 week ago
parent
commit
e937167efb

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

@@ -57,10 +57,7 @@ import java.text.SimpleDateFormat;
 import java.util.*;
 
 /**
- * @Description: 关键词
- * @Author: jeecg-boot
- * @Date: 2024-10-15
- * @Version: V1.0
+ * @Description: 关键词 @Author: jeecg-boot @Date: 2024-10-15 @Version: V1.0
  */
 @Tag(name = "关键词")
 @RestController
@@ -137,6 +134,9 @@ public class SeoKeywordsController extends JeecgController<SeoKeywords, ISeoKeyw
         if (site == null) {
             return Result.error("未找到对应站点");
         }
+        if (StringUtil.isEmpty(site.getDomain()) || Objects.equals(site.getIsDomain(), 0)) {
+            return Result.error("站点域名未设置!");
+        }
 
         seoKeywords.setAppKey(AdwebConstant.APPKEY);
         seoKeywords.setDomain(site.getDomain());
@@ -256,8 +256,7 @@ public class SeoKeywordsController extends JeecgController<SeoKeywords, ISeoKeyw
         String buttonColumn = req.getParameter("buttonColmn");
         String buttonSort = req.getParameter("buttonSort");
         Page<SeoKeywords> page = new Page<SeoKeywords>(pageNo, pageSize);
-        List<String> dateList =
-                seoKeywordsService.getKeywordsLastSevenDays(siteCode, keywordType);
+        List<String> dateList = seoKeywordsService.getKeywordsLastSevenDays(siteCode, keywordType);
         pageList =
                 seoKeywordsService.getKeywordList(
                         page,
@@ -401,7 +400,7 @@ public class SeoKeywordsController extends JeecgController<SeoKeywords, ISeoKeyw
         if (site == null) {
             return Result.error("站点不存在!");
         }
-        if (StringUtil.isEmpty(site.getDomain())) {
+        if (StringUtil.isEmpty(site.getDomain()) || Objects.equals(site.getIsDomain(), 0)) {
             return Result.error("站点域名未设置!");
         }
         UserPlanSubscription currentSeoAndSiteSubscription =