Преглед на файлове

seo管理 关键词管理调整

zq940222 преди 5 дни
родител
ревизия
81d0257c3f

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

@@ -266,9 +266,9 @@ public class SeoKeywordsController extends JeecgController<SeoKeywords, ISeoKeyw
             @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
             HttpServletRequest req)
             throws Exception {
-        if (sysBaseAPI.isNotOwnSite(avesApiSearchKeywordsDTO.getSiteCode())) {
-            return Result.OK(new Page<>());
-        }
+//        if (sysBaseAPI.isNotOwnSite(avesApiSearchKeywordsDTO.getSiteCode())) {
+//            return Result.OK(new Page<>());
+//        }
         // 参数判断
         IPage<SeoKeywords> pageList = new Page<>();
         String siteCode = req.getParameter("siteCode");

+ 10 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/seo/controller/SeoKeywordsRankController.java

@@ -6,6 +6,7 @@ import lombok.extern.slf4j.Slf4j;
 
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.modules.adweb.seo.dto.ComprehensiveStatistics;
+import org.jeecg.modules.adweb.seo.entity.SeoPlanSubscription;
 import org.jeecg.modules.adweb.seo.service.ISeoKeywordsRankService;
 import org.jeecg.modules.adweb.site.entity.AdwebSite;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -33,6 +34,15 @@ public class SeoKeywordsRankController {
     }
 
     /**
+     * 根据 站点code 获取 站点的 订阅Id
+     */
+    @GetMapping(value = "/getSubscriptionIdBySiteCode")
+    public Result<List<SeoPlanSubscription>> getSubscriptionIdBySiteCode(@RequestParam String siteCode) {
+        final List<SeoPlanSubscription> subscriptionIdBySiteCode = seoKeywordsRankService.getSubscriptionIdBySiteCode(siteCode);
+        return Result.OK(subscriptionIdBySiteCode);
+    }
+
+    /**
      * 获得综合统计信息
      */
     @GetMapping(value = "/comprehensiveInfo")

+ 2 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/seo/mapper/SeoKeywordsMapper.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.apache.ibatis.annotations.Param;
 import org.jeecg.modules.adweb.seo.entity.SeoKeywords;
+import org.jeecg.modules.adweb.seo.entity.SeoPlanSubscription;
 import org.jeecg.modules.adweb.seo.vo.RankInfoVO;
 
 import java.util.List;
@@ -99,4 +100,5 @@ public interface SeoKeywordsMapper extends BaseMapper<SeoKeywords> {
      */
     IPage<SeoKeywords> getPageListByCreateTime(Page<SeoKeywords> page, String siteCode, String keywords, String subscriptionId, String lastSearchTime, String createTime, Integer keywordType, String column, String order, Integer keywordRank);
 
+    List<SeoPlanSubscription> getSubscriptionIdBySiteCode(String siteCode);
 }

+ 16 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/seo/mapper/xml/SeoKeywordsMapper.xml

@@ -315,4 +315,20 @@
             ,last_rank ASC
         </if>
     </select>
+    <select id="getSubscriptionIdBySiteCode"
+            resultType="org.jeecg.modules.adweb.seo.entity.SeoPlanSubscription">
+        SELECT
+            t1.id,
+            t1.plan_id
+        FROM
+            seo_plan_subscription t1,
+            adweb_site t2
+        WHERE
+            t1.site_id = t2.id
+        AND
+            t1.`status` = 1
+        AND
+            t2.`code` = #{siteCode}
+
+    </select>
 </mapper>

+ 3 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/seo/service/ISeoKeywordsRankService.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.adweb.seo.service;
 import org.apache.poi.ss.usermodel.Sheet;
 import org.jeecg.modules.adweb.seo.dto.ComprehensiveStatistics;
 import org.jeecg.modules.adweb.seo.entity.SeoKeywords;
+import org.jeecg.modules.adweb.seo.entity.SeoPlanSubscription;
 import org.jeecg.modules.adweb.seo.vo.SeoRankInfoVO;
 import org.jeecg.modules.adweb.site.entity.AdwebSite;
 
@@ -30,4 +31,6 @@ public interface ISeoKeywordsRankService {
     void addRankInfoByIntervalTimeByType(List<SeoKeywords> keywordList, Integer keywordType, String siteCode, String historyId, List<String> dateList) throws Exception;
 
     void setSizeColumn(Sheet sheet, int size);
+
+    List<SeoPlanSubscription> getSubscriptionIdBySiteCode(String siteCode);
 }

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

@@ -360,4 +360,9 @@ public class SeoKeywordsRankServiceImpl implements ISeoKeywordsRankService {
             sheet.setColumnWidth(columnNum, columnWidth * 256);
         }
     }
+
+    @Override
+    public List<SeoPlanSubscription> getSubscriptionIdBySiteCode(String siteCode) {
+        return seoKeywordsMapper.getSubscriptionIdBySiteCode(siteCode);
+    }
 }